From 55c084216d068bf534a501ab9ccdb2ada7f65dbf Mon Sep 17 00:00:00 2001 From: Axionize <154778082+Axionize@users.noreply.github.com> Date: Sat, 5 Oct 2024 17:32:07 -0400 Subject: [PATCH] Fix incorrect casting to float before clamping attribute values --- .../ac/grim/grimac/utils/data/attribute/ValuedAttribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ac/grim/grimac/utils/data/attribute/ValuedAttribute.java b/src/main/java/ac/grim/grimac/utils/data/attribute/ValuedAttribute.java index d83882aa53..065559d0f2 100644 --- a/src/main/java/ac/grim/grimac/utils/data/attribute/ValuedAttribute.java +++ b/src/main/java/ac/grim/grimac/utils/data/attribute/ValuedAttribute.java @@ -123,7 +123,7 @@ public double with(WrapperPlayServerUpdateAttributes.Property property) { d1 *= 1.0D + attributemodifier.getAmount(); } - double newValue = GrimMath.clampFloat((float) d1, (float) min, (float) max); + double newValue = GrimMath.clamp(d1, min, max); if (setRewriter != null) { newValue = setRewriter.apply(this.value, newValue); }