Skip to content

Commit ea62988

Browse files
chore: more porting
1 parent 7f75393 commit ea62988

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksClient.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import net.minecraft.client.player.LocalPlayer;
6666
import net.minecraft.client.renderer.GameRenderer;
6767
import net.minecraft.client.renderer.RenderType;
68+
import net.minecraft.client.renderer.texture.DynamicTexture;
6869
import net.minecraft.client.renderer.texture.OverlayTexture;
6970
import net.minecraft.core.BlockPos;
7071
import net.minecraft.core.GlobalPos;
@@ -105,6 +106,11 @@
105106
import java.util.function.Function;
106107
import java.util.stream.Collectors;
107108

109+
/**
110+
* TODO: Split into classes, this file is way over sized!
111+
* - Split the minimap into render layers that can be registered via an API
112+
* - This would split out the various layers, background, icons, borders, etc.
113+
*/
108114
public enum FTBChunksClient {
109115
INSTANCE;
110116

@@ -912,9 +918,10 @@ private void drawInWorldIcons(Minecraft mc, GuiGraphics graphics, DeltaTracker t
912918
inWorldMapIcons.clear();
913919

914920
// Cleanup after the Gui.setupDrawing
915-
RenderSystem.disableBlend();
916-
RenderSystem.setShaderColor(1F, 1F, 1F, 1F);
917-
RenderSystem.disableDepthTest();
921+
// TODO: [21.8] Put back or remove.
922+
// RenderSystem.disableBlend();
923+
// RenderSystem.setShaderColor(1F, 1F, 1F, 1F);
924+
// RenderSystem.disableDepthTest();
918925
}
919926

920927
public void renderWorldLast(PoseStack poseStack, Matrix4f projectionMatrix, Matrix4f modelViewMatrix, Camera camera, DeltaTracker tickDelta) {
@@ -948,7 +955,7 @@ public void renderWorldLast(PoseStack poseStack, Matrix4f projectionMatrix, Matr
948955
float y1 = (float) (cameraPos.y + 30D);
949956
float y2 = y1 + 70F;
950957

951-
int yMin = mc.level.getMinBuildHeight();
958+
int yMin = mc.level.getMinY();
952959

953960
for (WaypointIcon waypoint : visibleWaypoints) {
954961
drawWaypointBeacon(poseStack, cameraPos, depthBuffer, y1, y2, yMin, waypoint);

common/src/main/java/dev/ftb/mods/ftbchunks/net/RequestMapDataPacket.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
import net.minecraft.network.codec.StreamCodec;
88
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
99

10-
/**
11-
* @author LatvianModder
12-
*/
1310
public record RequestMapDataPacket(int fromX, int fromZ, int toX, int toZ) implements CustomPacketPayload {
1411
public static final Type<RequestMapDataPacket> TYPE = new Type<>(FTBChunksAPI.rl("request_map_data_packet"));
1512

@@ -29,4 +26,4 @@ public Type<RequestMapDataPacket> type() {
2926
public static void handle(RequestMapDataPacket message, NetworkManager.PacketContext context) {
3027
//FIXME: SendMapDataPacket.send(Objects.requireNonNull(context.get().getSender())));
3128
}
32-
}
29+
}

0 commit comments

Comments
 (0)