0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00

Document mixin for hungry sprint option

This commit is contained in:
Alexander01998 2023-12-15 15:18:01 +01:00
parent 5aae878fce
commit 236bca890d

View File

@ -169,8 +169,12 @@ public class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
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);