Skip to content

Commit

Permalink
what about now
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Oct 24, 2023
1 parent c4286c3 commit 1e88ea7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 1e88ea7

Please sign in to comment.