diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 72c68111..4f054af2 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,8 +5,8 @@ on: branches: - "mainline" env: - WORLDMAP_VERSION: "1.37.0" - MINIMAP_VERSION: "23.9.0" + WORLDMAP_VERSION: "1.37.1" + MINIMAP_VERSION: "23.9.1" MINECRAFT_VERSION: "1.12.2" MINECRAFT_VERSION_SHORT: "1.12" MOD_LOADER: "Forge" diff --git a/build.gradle b/build.gradle index 8af8eb01..bf958c6d 100644 --- a/build.gradle +++ b/build.gradle @@ -114,8 +114,8 @@ dependencies { jarLibs 'com.github.ben-manes.caffeine:caffeine:2.9.3' jarLibs 'org.xerial:sqlite-jdbc:3.44.1.0' - implementation(fg.deobf("maven.modrinth:xaeros-world-map:1.37.0_Forge_1.12")) - implementation(fg.deobf("maven.modrinth:xaeros-minimap:23.9.0_Forge_1.12")) + implementation(fg.deobf("maven.modrinth:xaeros-world-map:1.37.1_Forge_1.12")) + implementation(fg.deobf("maven.modrinth:xaeros-minimap:23.9.1_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 06e62c2f..16401d43 100644 --- a/src/main/java/xaeroplus/XaeroPlus.java +++ b/src/main/java/xaeroplus/XaeroPlus.java @@ -17,7 +17,7 @@ modid = XaeroPlus.MODID, name = XaeroPlus.NAME, version = XaeroPlus.VERSION, - dependencies = "after:xaerominimap;after:xaerobetterpvp;required-after:xaeroworldmap@[1.37.0];" + dependencies = "after:xaerominimap;after:xaerobetterpvp;required-after:xaeroworldmap@[1.37.1];" ) public class XaeroPlus { public static final String MODID = "xaeroplus"; diff --git a/src/main/java/xaeroplus/mixin/client/MixinGuiMap.java b/src/main/java/xaeroplus/mixin/client/MixinGuiMap.java index 9ca85166..e93a5207 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinGuiMap.java +++ b/src/main/java/xaeroplus/mixin/client/MixinGuiMap.java @@ -403,7 +403,10 @@ public void customDrawScreen(int scaledMouseX, int scaledMouseY, float partialTi double playerDimDiv = this.prevPlayerDimDiv; synchronized(this.mapProcessor.renderThreadPauseSync) { if (!this.mapProcessor.isRenderingPaused()) { - playerDimDiv = this.mapProcessor.getMapWorld().getCurrentDimension().calculateDimDiv(this.player.world.provider); + MapDimension mapDim = this.mapProcessor.getMapWorld().getCurrentDimension(); + if (mapDim != null) { + playerDimDiv = mapDim.calculateDimDiv(this.player.world.provider); + } } } diff --git a/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroWorldmap.java b/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroWorldmap.java index bf0b64ef..b57c7289 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroWorldmap.java +++ b/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroWorldmap.java @@ -12,9 +12,6 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import xaero.common.IXaeroMinimap; import xaero.common.XaeroMinimapSession; import xaero.common.effect.Effects; @@ -30,7 +27,6 @@ import xaero.map.region.LeveledRegion; import xaero.map.region.MapRegion; import xaero.map.region.MapTileChunk; -import xaeroplus.XaeroPlus; import xaeroplus.module.ModuleManager; import xaeroplus.module.impl.NewChunks; import xaeroplus.module.impl.PortalSkipDetection; @@ -78,16 +74,6 @@ public abstract class MixinSupportXaeroWorldmap { public abstract boolean hasCaveLayers(); @Shadow public abstract boolean hasDimensionSwitching(); - - // not caused by xaeroplus but i'll fix it anyway lol - @Inject(method = "getMapDimensionScale", at = @At(value = "INVOKE", target = "Lxaero/map/WorldMapSession;getMapProcessor()Lxaero/map/MapProcessor;", shift = At.Shift.BEFORE), cancellable = true) - public void getCurrentDimensionCrashPrevention(final CallbackInfoReturnable cir) { - if (WorldMapSession.getCurrentSession().getMapProcessor().getMapWorld().getCurrentDimension() == null) { - XaeroPlus.LOGGER.info("Prevented xaero crash xD"); - cir.setReturnValue(0.0); - } - } - @Shadow protected abstract void bumpLoadedRegion(MapProcessor mapProcessor, MapRegion region, boolean wmHasCaveLayers);