Skip to content

Commit

Permalink
Document mixin for hungry sprint option
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 15, 2023
1 parent 5aae878 commit 236bca8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ private void afterUpdateNausea(CallbackInfo ci)
tempCurrentScreen = null;
}

/**
* This mixin allows AutoSprint to enable sprinting even when the player is
* too hungry.
*/
@Inject(at = @At("HEAD"), method = "canSprint()Z", cancellable = true)
private void canSprint(CallbackInfoReturnable<Boolean> cir)
private void onCanSprint(CallbackInfoReturnable<Boolean> cir)
{
if(WurstClient.INSTANCE.getHax().autoSprintHack.shouldSprintHungry())
cir.setReturnValue(true);
Expand Down

0 comments on commit 236bca8

Please sign in to comment.