From 2633ca7da461f0be2726b9ca03106f4fc9ac5504 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:48:45 -0700 Subject: [PATCH] WM1.39.0 --- .github/workflows/1.12.2.yml | 2 +- .github/workflows/gradle.yml | 2 +- build.gradle | 2 +- src/main/java/xaeroplus/XaeroPlus.java | 2 +- .../mixin/client/MixinMapProcessor.java | 4 +-- .../mixin/client/MixinMinimapFBORenderer.java | 3 +++ .../mixin/client/MixinRegionTexture.java | 25 ------------------- .../mixin/client/MixinWaypointsManager.java | 2 +- src/main/resources/mixins.xaeroplus.json | 1 - 9 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 src/main/java/xaeroplus/mixin/client/MixinRegionTexture.java diff --git a/.github/workflows/1.12.2.yml b/.github/workflows/1.12.2.yml index 327f59b6..2bee66fc 100644 --- a/.github/workflows/1.12.2.yml +++ b/.github/workflows/1.12.2.yml @@ -7,7 +7,7 @@ on: - "mainline" env: - WORLDMAP_VERSION: "1.38.8" + WORLDMAP_VERSION: "1.39.0" MINIMAP_VERSION: "24.3.0" MINECRAFT_VERSION: "1.12.2" MINECRAFT_VERSION_SHORT: "1.12" diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fc886b80..9dc6a1f0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: env: - WORLDMAP_VERSION: "1.38.8" + WORLDMAP_VERSION: "1.39.0" MINIMAP_VERSION: "24.3.0" MINECRAFT_VERSION: "1.12.2" MINECRAFT_VERSION_SHORT: "1.12" diff --git a/build.gradle b/build.gradle index e5ec051e..da6907f4 100644 --- a/build.gradle +++ b/build.gradle @@ -114,7 +114,7 @@ dependencies { jarLibs 'com.github.ben-manes.caffeine:caffeine:2.9.3' jarLibs 'org.xerial:sqlite-jdbc:3.45.0.0' - implementation(fg.deobf("maven.modrinth:xaeros-world-map:1.38.8_Forge_1.12")) + implementation(fg.deobf("maven.modrinth:xaeros-world-map:1.39.0_Forge_1.12")) implementation(fg.deobf("maven.modrinth:xaeros-minimap:24.3.0_Forge_1.12")) implementation(fg.deobf('cabaletta:baritone-deobf-unoptimized-mcp-dev:1.2')).setChanging(true) compileOnly(fg.deobf("curse.maven:waystones-245755:2859589")) diff --git a/src/main/java/xaeroplus/XaeroPlus.java b/src/main/java/xaeroplus/XaeroPlus.java index 01e5950c..525a9a1d 100644 --- a/src/main/java/xaeroplus/XaeroPlus.java +++ b/src/main/java/xaeroplus/XaeroPlus.java @@ -18,7 +18,7 @@ modid = XaeroPlus.MODID, name = XaeroPlus.NAME, version = XaeroPlus.VERSION, - dependencies = "after:xaerominimap;after:xaerobetterpvp;required-after:xaeroworldmap@[1.38.8];" + dependencies = "after:xaerominimap;after:xaerobetterpvp;required-after:xaeroworldmap@[1.39.0];" ) public class XaeroPlus { public static final String MODID = "xaeroplus"; diff --git a/src/main/java/xaeroplus/mixin/client/MixinMapProcessor.java b/src/main/java/xaeroplus/mixin/client/MixinMapProcessor.java index 8ed7f702..7ddc031d 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinMapProcessor.java +++ b/src/main/java/xaeroplus/mixin/client/MixinMapProcessor.java @@ -168,8 +168,8 @@ public abstract class MixinMapProcessor { @Shadow private OverlayManager overlayManager; - @Inject(method = "getMainId", at = @At("HEAD"), cancellable = true) - private void getMainId(boolean rootFolderFormat, boolean preIP6Fix, CallbackInfoReturnable cir) { + @Inject(method = "getMainId(I)Ljava/lang/String;", at = @At("HEAD"), cancellable = true) + private void getMainId(final int version, final CallbackInfoReturnable cir) { DataFolderResolveUtil.resolveDataFolder(cir); } diff --git a/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java b/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java index a7089e33..835c3a8f 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java +++ b/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java @@ -32,6 +32,7 @@ import xaero.common.misc.Misc; import xaero.common.misc.OptimizedMath; import xaero.common.settings.ModSettings; +import xaero.hud.compat.mods.ImmediatelyFastHelper; import xaero.hud.minimap.Minimap; import xaero.hud.minimap.MinimapLogs; import xaeroplus.settings.XaeroPlusSettingRegistry; @@ -147,6 +148,7 @@ public void renderChunksToFBO( int offsetX = xFloored & 63; int offsetZ = zFloored & 63; boolean zooming = (double)((int)this.zoom) != this.zoom; + ImmediatelyFastHelper.triggerBatchingBuffersFlush(); this.scalingFramebuffer.bindFramebuffer(true); GL11.glClear(16640); GlStateManager.enableTexture2D(); @@ -357,6 +359,7 @@ public void renderChunksToFBO( halfWView ); GlStateManager.popMatrix(); + ImmediatelyFastHelper.triggerBatchingBuffersFlush(); this.rotationFramebuffer.unbindFramebuffer(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.disableBlend(); diff --git a/src/main/java/xaeroplus/mixin/client/MixinRegionTexture.java b/src/main/java/xaeroplus/mixin/client/MixinRegionTexture.java deleted file mode 100644 index 17bd647c..00000000 --- a/src/main/java/xaeroplus/mixin/client/MixinRegionTexture.java +++ /dev/null @@ -1,25 +0,0 @@ -package xaeroplus.mixin.client; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; -import xaero.map.graphics.PixelBuffers; -import xaero.map.region.texture.RegionTexture; - -import java.nio.ByteBuffer; - -@Mixin(value = RegionTexture.class, remap = false) -public class MixinRegionTexture { - - @Redirect(method = "writeToUnpackPBO", at = @At( - value = "INVOKE", - target = "Lxaero/map/graphics/PixelBuffers;glMapBuffer(IIJLjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;" - )) - public ByteBuffer redirectGlMapBuffer(final int target, final int access, final long length, final ByteBuffer buffer) { - ByteBuffer result = PixelBuffers.glMapBuffer(target, access, length, buffer); - if (result == null && System.getenv("XP_CI_TEST") != null) { - return ByteBuffer.allocate((int) length); - } - return result; - } -} diff --git a/src/main/java/xaeroplus/mixin/client/MixinWaypointsManager.java b/src/main/java/xaeroplus/mixin/client/MixinWaypointsManager.java index 53242635..69ab8cc1 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinWaypointsManager.java +++ b/src/main/java/xaeroplus/mixin/client/MixinWaypointsManager.java @@ -75,7 +75,7 @@ public boolean isUsingDefaultTeleportCommand(final WaypointWorldRootContainer in return !crossDimTeleport; } - @Inject(method = "getMainContainer", at = @At("HEAD"), cancellable = true) + @Inject(method = "getMainContainer(I)Ljava/lang/String;", at = @At("HEAD"), cancellable = true) private void getMainContainer(CallbackInfoReturnable cir) { DataFolderResolveUtil.resolveDataFolder(cir); } diff --git a/src/main/resources/mixins.xaeroplus.json b/src/main/resources/mixins.xaeroplus.json index 5894bd3f..bc3cfd79 100644 --- a/src/main/resources/mixins.xaeroplus.json +++ b/src/main/resources/mixins.xaeroplus.json @@ -41,7 +41,6 @@ "MixinPixelBuffers", "MixinRadarRenderContext", "MixinRadarRenderProvider", - "MixinRegionTexture", "MixinSupportXaeroMinimap", "MixinSupportXaeroWorldmap", "MixinWaypoint",