From f2a46223f773a0a8dae58fa6496eaff1dc955615 Mon Sep 17 00:00:00 2001 From: thebuildcraft <104298589+thebuildcraft@users.noreply.github.com> Date: Sat, 6 Jul 2024 12:54:34 +0200 Subject: [PATCH] fix 1.16.5 compiling --- .../fabric/mods/xaerominimap/WaypointsGuiRendererMixin.java | 6 +++++- .../forge/mods/xaerominimap/WaypointsGuiRendererMixin.java | 6 +++++- .../mods/xaerominimap/WaypointsGuiRendererMixin.java | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/fabric/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/fabric/mods/xaerominimap/WaypointsGuiRendererMixin.java b/fabric/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/fabric/mods/xaerominimap/WaypointsGuiRendererMixin.java index 9d2fd18..476f938 100644 --- a/fabric/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/fabric/mods/xaerominimap/WaypointsGuiRendererMixin.java +++ b/fabric/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/fabric/mods/xaerominimap/WaypointsGuiRendererMixin.java @@ -34,7 +34,7 @@ /** * @author TheMrEngMan * @author Leander Knüttel - * @version 03.07.2024 + * @version 06.07.2024 */ @Pseudo @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin { @Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false) private void injected(CallbackInfoReturnable cir) { CommonModConfig.WaypointRenderBelowMode waypointRenderBelowMode = CommonModConfig.Instance.minimapWaypointsRenderBelow(); + #if MC_VER > MC_1_16_5 boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown() || ModSettings.keyAlternativeListPlayers.isDown(); + #else + boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown(); + #endif if (waypointRenderBelowMode == CommonModConfig.WaypointRenderBelowMode.ALWAYS) { cir.setReturnValue(-1); diff --git a/forge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/forge/mods/xaerominimap/WaypointsGuiRendererMixin.java b/forge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/forge/mods/xaerominimap/WaypointsGuiRendererMixin.java index db7adf3..5e0030f 100644 --- a/forge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/forge/mods/xaerominimap/WaypointsGuiRendererMixin.java +++ b/forge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/forge/mods/xaerominimap/WaypointsGuiRendererMixin.java @@ -34,7 +34,7 @@ /** * @author TheMrEngMan * @author Leander Knüttel - * @version 03.07.2024 + * @version 06.07.2024 */ @Pseudo @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin { @Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false) private void injected(CallbackInfoReturnable cir) { CommonModConfig.WaypointRenderBelowMode waypointRenderBelowMode = CommonModConfig.Instance.minimapWaypointsRenderBelow(); + #if MC_VER > MC_1_16_5 boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown() || ModSettings.keyAlternativeListPlayers.isDown(); + #else + boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown(); + #endif if (waypointRenderBelowMode == CommonModConfig.WaypointRenderBelowMode.ALWAYS) { cir.setReturnValue(-1); diff --git a/neoforge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/neoforge/mods/xaerominimap/WaypointsGuiRendererMixin.java b/neoforge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/neoforge/mods/xaerominimap/WaypointsGuiRendererMixin.java index 9a1df47..0953dc7 100644 --- a/neoforge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/neoforge/mods/xaerominimap/WaypointsGuiRendererMixin.java +++ b/neoforge/src/main/java/de/the_build_craft/remote_player_waypoints_for_xaero/mixins/neoforge/mods/xaerominimap/WaypointsGuiRendererMixin.java @@ -34,7 +34,7 @@ /** * @author TheMrEngMan * @author Leander Knüttel - * @version 03.07.2024 + * @version 06.07.2024 */ @Pseudo @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin { @Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false) private void injected(CallbackInfoReturnable cir) { CommonModConfig.WaypointRenderBelowMode waypointRenderBelowMode = CommonModConfig.Instance.minimapWaypointsRenderBelow(); + #if MC_VER > MC_1_16_5 boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown() || ModSettings.keyAlternativeListPlayers.isDown(); + #else + boolean playerListDown = Minecraft.getInstance().options.keyPlayerList.isDown(); + #endif if (waypointRenderBelowMode == CommonModConfig.WaypointRenderBelowMode.ALWAYS) { cir.setReturnValue(-1);