Skip to content

Commit

Permalink
Merge pull request #1750 from Axionize/fix-attribute-clamp
Browse files Browse the repository at this point in the history
Fix incorrect casting to float before clamping attribute values
  • Loading branch information
SamB440 authored Oct 5, 2024
2 parents ea85282 + 55c0842 commit fde6e03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit fde6e03

Please sign in to comment.