Skip to content

Commit

Permalink
fix mixins?
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi-reden committed Jun 26, 2024
1 parent 19362af commit 09d5cb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ abstract class ClampedEntityAttributeMixin extends EntityAttributeMixin {
return original;
}

@ModifyReturnValue(method = "clamp", at = @At("RETURN"))
private double data_attributes$clamp(double original, @Local(argsOnly = true) double value) {
if (this.data_enabled) {
return this.data_attributes$clamped(value);
}
return original;
}

@Override
public double data_attributes$min_fallback() {
return this.minValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private EntityAttribute data_getAttribute(EntityAttribute original) {
return attribute != null ? attribute : original;
}

@ModifyReturnValue(method = "computeValue", at = @At("RETURN"), remap = false)
@ModifyReturnValue(method = "computeValue", at = @At("RETURN"))
private double data_attributes$computeValue(double original) {
MutableEntityAttribute attribute = (MutableEntityAttribute) this.getAttribute();
StackingFormula formula = attribute.data_attributes$formula();
Expand Down

0 comments on commit 09d5cb4

Please sign in to comment.