Skip to content

Commit

Permalink
mixin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Dec 20, 2024
1 parent 76f7e14 commit 6c0425a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@

@Mixin(FoodData.class)
public class HungerManagerMixin {
@WrapOperation(method = "tick", at = @At(value = "INVOKE_ASSIGN",
@WrapOperation(method = "tick", at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/level/GameRules;getBoolean(Lnet/minecraft/world/level/GameRules$Key;)Z",
ordinal = 0
))
public boolean arcanuscontinuum$hasBurnout(GameRules instance, GameRules.Key<GameRules.BooleanValue> gameRuleKey, Operation<Boolean> original, Player player) {
if(ArcanusComponents.getBurnout(player) > 0.0D) {
return false;
}
return original.call(instance, gameRuleKey);
return original.call(instance, gameRuleKey) && ArcanusComponents.getBurnout(player) <= 0.0D;
}
}

0 comments on commit 6c0425a

Please sign in to comment.