diff --git a/src/main/java/xaeroplus/mixin/client/MixinMapWriter.java b/src/main/java/xaeroplus/mixin/client/MixinMapWriter.java index da60b182..457724f2 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinMapWriter.java +++ b/src/main/java/xaeroplus/mixin/client/MixinMapWriter.java @@ -386,7 +386,7 @@ public boolean fastMap(final MapWriter instance, final Long cacheable = ChunkUtils.chunkPosToLong(chunkX, chunkZ); final Long cacheValue = tileUpdateCache.getIfPresent(cacheable); if (nonNull(cacheValue)) { - if (cacheValue < System.currentTimeMillis() - 250L) { + if (cacheValue < System.currentTimeMillis() - 50L) { tileUpdateCache.put(cacheable, System.currentTimeMillis()); } else { return false; diff --git a/src/main/java/xaeroplus/mixin/client/MixinMinimapWorldStateUpdater.java b/src/main/java/xaeroplus/mixin/client/MixinMinimapWorldStateUpdater.java index 53ca96eb..c71d0a94 100644 --- a/src/main/java/xaeroplus/mixin/client/MixinMinimapWorldStateUpdater.java +++ b/src/main/java/xaeroplus/mixin/client/MixinMinimapWorldStateUpdater.java @@ -1,44 +1,16 @@ package xaeroplus.mixin.client; -import com.llamalad7.mixinextras.sugar.Local; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import xaero.hud.minimap.module.MinimapSession; import xaero.hud.minimap.world.state.MinimapWorldStateUpdater; import xaero.hud.path.XaeroPath; -import xaeroplus.settings.XaeroPlusSettingRegistry; -import xaeroplus.util.ChunkUtils; import xaeroplus.util.DataFolderResolveUtil; @Mixin(value = MinimapWorldStateUpdater.class, remap = false) public class MixinMinimapWorldStateUpdater { - @Unique private int currentDim = 0; - @Shadow @Final private MinimapSession session; - - @Inject(method = "update()V", at = @At( - value = "INVOKE", - target = "Lxaero/hud/minimap/world/state/MinimapWorldState;setAutoWorldPath(Lxaero/hud/path/XaeroPath;)V" - )) - public void preferOwWpSetCustomPathOnDimUpdate(final CallbackInfo ci, @Local(name = "potentialAutoContainerPath") String potentialAutoWorldNode) { - if (XaeroPlusSettingRegistry.owAutoWaypointDimension.getValue()) { - int actualDimension = ChunkUtils.getActualDimension(); - if (actualDimension == -1 && currentDim != actualDimension) { - XaeroPath overworldWpXaeroPath = session.getWorldState().getAutoRootContainerPath() - .resolve(session.getDimensionHelper().getDimensionDirectoryName(0)) - .resolve(potentialAutoWorldNode); // todo: probably not quite correct with all multiworld configs - session.getWorldState().setCustomWorldPath(overworldWpXaeroPath); - } - } - currentDim = ChunkUtils.getActualDimension(); - } - @Inject(method = "getAutoRootContainerPath(I)Lxaero/hud/path/XaeroPath;", at = @At("HEAD"), cancellable = true) public void customDataFolderResolve(final int version, final CallbackInfoReturnable cir) { CallbackInfoReturnable customCir = new CallbackInfoReturnable("a", true); diff --git a/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroMinimap.java b/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroMinimap.java deleted file mode 100644 index b03faa86..00000000 --- a/src/main/java/xaeroplus/mixin/client/MixinSupportXaeroMinimap.java +++ /dev/null @@ -1,20 +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.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import xaero.map.mods.SupportXaeroMinimap; -import xaeroplus.settings.XaeroPlusSettingRegistry; - -@Mixin(value = SupportXaeroMinimap.class, remap = false) -public class MixinSupportXaeroMinimap { - - @Inject(method = "getSubWorldNameToRender", at = @At("HEAD"), cancellable = true) - public void getSubworldNameToRenderInject(final CallbackInfoReturnable cir) { - if (XaeroPlusSettingRegistry.owAutoWaypointDimension.getValue()) { - // remove annoying string rendered in the middle of the worldmap - cir.setReturnValue(null); - } - } -} diff --git a/src/main/java/xaeroplus/settings/XaeroPlusSettingRegistry.java b/src/main/java/xaeroplus/settings/XaeroPlusSettingRegistry.java index d299f1d1..d99331e5 100644 --- a/src/main/java/xaeroplus/settings/XaeroPlusSettingRegistry.java +++ b/src/main/java/xaeroplus/settings/XaeroPlusSettingRegistry.java @@ -199,12 +199,6 @@ public final class XaeroPlusSettingRegistry { ColorHelper.HighlightColor.values(), ColorHelper.HighlightColor.GREEN, SettingLocation.WORLD_MAP_MAIN); - public static final XaeroPlusBooleanSetting owAutoWaypointDimension = XaeroPlusBooleanSetting.create( - "Prefer Overworld Waypoints", - "setting.world_map.ow_auto_waypoint_dimension", - "setting.world_map.ow_auto_waypoint_dimension.tooltip", - true, - SettingLocation.WORLD_MAP_MAIN); public static final XaeroPlusBooleanSetting showWaypointDistances = XaeroPlusBooleanSetting.create( "Show Waypoint Distances", "setting.world_map.show_waypoint_distances", diff --git a/src/main/resources/mixins.xaeroplus.json b/src/main/resources/mixins.xaeroplus.json index 54cba80c..17cfbaf0 100644 --- a/src/main/resources/mixins.xaeroplus.json +++ b/src/main/resources/mixins.xaeroplus.json @@ -38,7 +38,6 @@ "MixinPixelBuffers", "MixinRadarRenderContext", "MixinRadarRenderProvider", - "MixinSupportXaeroMinimap", "MixinSupportXaeroWorldmap", "MixinWaypointReader", "MixinWaypointsIngameRenderer",