Skip to content

Commit 9c81aaf

Browse files
chore: rendering is complicated!
1 parent b21c35b commit 9c81aaf

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ allprojects {
6262
includeGroup "dev.ftb.mods"
6363
}
6464
}
65+
maven {
66+
url = "https://cursemaven.com"
67+
content {
68+
includeGroup "curse.maven"
69+
}
70+
}
6571
}
6672

6773
java {

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,13 @@ public void renderHud(GuiGraphics graphics, DeltaTracker tickDelta) {
563563
int oz = cz + mz - FTBChunks.TILE_OFFSET;
564564

565565
MapRegion region = dim.getRegion(XZ.regionFromChunk(ox, oz));
566+
if (dynamicTexture != null) {
567+
dynamicTexture.close();
568+
}
569+
566570
dynamicTexture = new DynamicTexture(() -> "Minimap", region.getRenderedMapImage());
567-
dynamicTexture.upload(); // TODO: [21.8] this might not be needed
571+
// dynamicTexture.upload(); // TODO: [21.8] this might not be needed
572+
System.out.printf("Generated minimap for region %s (chunk %d,%d) at %d,%d\n", region.pos, ox, oz, mx * 16, mz * 16);
568573
// region.getRenderedMapImage().upload(0, mx * 16, mz * 16, (ox & 31) * 16, (oz & 31) * 16, 16, 16, minimapBlur, false, false, false);
569574
}
570575
}
@@ -798,7 +803,7 @@ public void renderHud(GuiGraphics graphics, DeltaTracker tickDelta) {
798803
poseStack.pushMatrix();
799804
poseStack.translate((float) (x + halfSizeD), (float) (y + halfSizeD));
800805
if (rotationLocked) {
801-
poseStack.rotate(mc.player.getYRot() + 180F);
806+
poseStack.rotate((mc.player.getVisualRotationYInDegrees() + 180F) / 100);
802807
// poseStack.mulPose(Axis.ZP.rotationDegrees(mc.player.getYRot() + 180F));
803808
}
804809
poseStack.scale(size / 16F, size / 16F);

fabric/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ dependencies {
5858
modImplementation("dev.ftb.mods:ftb-library-fabric:${rootProject.ftb_library_version}") { transitive = false }
5959
modImplementation("dev.ftb.mods:ftb-teams-fabric:${rootProject.ftb_teams_version}") { transitive = false }
6060

61+
modImplementation "curse.maven:atlasviewer-633577:6712181"
62+
6163
common(project(path: ":common", configuration: "dev")) { transitive false }
6264
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
6365
}

neoforge/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ dependencies {
3838
modImplementation("dev.ftb.mods:ftb-library-neoforge:${rootProject.ftb_library_version}") { transitive = false }
3939
modImplementation("dev.ftb.mods:ftb-teams-neoforge:${rootProject.ftb_teams_version}") { transitive = false }
4040

41+
implementation "curse.maven:atlasviewer-633577:6712190"
42+
4143
common(project(path: ":common", configuration: "dev")) { transitive false }
4244
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive false }
4345
}

0 commit comments

Comments
 (0)