From 1e88ea7abf10a8d18c0fad3f21a22693ad0597ea Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:37:18 -0400 Subject: [PATCH] what about now --- .../mixin/entity/crab/ServerGamePacketListenerImplMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/entity/crab/ServerGamePacketListenerImplMixin.java b/src/main/java/net/frozenblock/wilderwild/mixin/entity/crab/ServerGamePacketListenerImplMixin.java index 8efebd4342..b24c54e1fb 100644 --- a/src/main/java/net/frozenblock/wilderwild/mixin/entity/crab/ServerGamePacketListenerImplMixin.java +++ b/src/main/java/net/frozenblock/wilderwild/mixin/entity/crab/ServerGamePacketListenerImplMixin.java @@ -4,6 +4,7 @@ import net.frozenblock.wilderwild.registry.RegisterMobEffects; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.network.ServerGamePacketListenerImpl; +import net.minecraft.util.Mth; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -27,7 +28,7 @@ public class ServerGamePacketListenerImplMixin { public double wilderWild$handleUseItemOn2(double original) { if (this.player != null && this.player.hasEffect(RegisterMobEffects.REACH)) { int amplifier = this.player.getEffect(RegisterMobEffects.REACH).getAmplifier() + 1; - return original + (amplifier * 0.75D); + return Mth.square(Math.sqrt(original) + amplifier * 0.75D); } return original; }