From ed3e5f60f1f5699366f5c71cd0c4fd782eed4fdb Mon Sep 17 00:00:00 2001 From: Su5eD Date: Mon, 23 Oct 2023 19:16:13 +0200 Subject: [PATCH] Make REA ScreenHandlerMixin optional to avoid conflict with Pehkui Fixes #7 --- gradle.properties | 2 +- .../reachentityattributes/mixin/ForgingScreenHandlerMixin.java | 2 +- .../reachentityattributes/mixin/ScreenHandlerMixin.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index eb46c8a..9c7a43a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ loom.platform=forge # Versions versionMc=1.20.1 versionForge=47.1.3 -versionConnectorExtras=1.4.1 +versionConnectorExtras=1.4.2 # Publishing curseForgeId=913445 diff --git a/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ForgingScreenHandlerMixin.java b/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ForgingScreenHandlerMixin.java index 7a61255..6653de3 100644 --- a/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ForgingScreenHandlerMixin.java +++ b/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ForgingScreenHandlerMixin.java @@ -17,7 +17,7 @@ abstract class ForgingScreenHandlerMixin extends ScreenHandler { @ModifyConstant( method = "method_24924(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/lang/Boolean;", - require = 1, allow = 1, constant = @Constant(doubleValue = 64.0)) + require = 0, allow = 1, constant = @Constant(doubleValue = 64.0)) private double getActualReachDistance(final double reachDistance, final PlayerEntity player) { return ReachEntityAttributes.getSquaredReachDistance(player, reachDistance); } diff --git a/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ScreenHandlerMixin.java b/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ScreenHandlerMixin.java index 815222a..22423b6 100644 --- a/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ScreenHandlerMixin.java +++ b/reach-entity-attributes/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ScreenHandlerMixin.java @@ -12,7 +12,7 @@ abstract class ScreenHandlerMixin { @ModifyConstant( method = "method_17696(Lnet/minecraft/block/Block;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/lang/Boolean;", - require = 1, allow = 1, constant = @Constant(doubleValue = 64.0)) + require = 0, allow = 1, constant = @Constant(doubleValue = 64.0)) private static double getActualReachDistance(final double reachDistance, final Block block, final PlayerEntity player) { return ReachEntityAttributes.getSquaredReachDistance(player, reachDistance); }