Skip to content

Commit

Permalink
fix 1.16.5 compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuildcraft committed Jul 6, 2024
1 parent 61c4b37 commit f2a4622
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @author TheMrEngMan
* @author Leander Knüttel
* @version 03.07.2024
* @version 06.07.2024
*/

@Pseudo
Expand All @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin {
@Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false)
private void injected(CallbackInfoReturnable<Integer> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @author TheMrEngMan
* @author Leander Knüttel
* @version 03.07.2024
* @version 06.07.2024
*/

@Pseudo
Expand All @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin {
@Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false)
private void injected(CallbackInfoReturnable<Integer> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @author TheMrEngMan
* @author Leander Knüttel
* @version 03.07.2024
* @version 06.07.2024
*/

@Pseudo
Expand All @@ -44,7 +44,11 @@ public class WaypointsGuiRendererMixin {
@Inject(method = "getOrder", at = @At("RETURN"), cancellable = true, remap = false)
private void injected(CallbackInfoReturnable<Integer> 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);
Expand Down

0 comments on commit f2a4622

Please sign in to comment.