修复耐力bug

This commit is contained in:
Atsuishio 2025-04-12 15:56:18 +08:00 committed by Light_Quanta
parent 083e233624
commit 4183590fd4
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
2 changed files with 2 additions and 5 deletions

View file

@ -203,9 +203,6 @@ public class ClickHandler {
if (key == Minecraft.getInstance().options.keyJump.getKey().getValue()) {
handleDoubleJump(player);
if (player.onGround()) {
stamina += 5;
}
}
if (key == ModKeyMappings.CONFIG.getKey().getValue() && ModKeyMappings.CONFIG.getKeyModifier().isActive(KeyConflictContext.IN_GAME)) {

View file

@ -305,7 +305,7 @@ public class ClientEventHandler {
return;
}
tacticalSprint = !exhaustion && !zoom && isMoving() && player.isSprinting() && player.getVehicle() == null && player.onGround() && !player.getAbilities().flying;
tacticalSprint = !exhaustion && !zoom && isMoving() && player.isSprinting() && player.getVehicle() == null && !player.getAbilities().flying;
ItemStack stack = player.getMainHandItem();
@ -1109,7 +1109,7 @@ public class ClientEventHandler {
}
}
if (isMoving()) {
if (isMoving() && !entity.isSprinting()) {
moveYTime += 1.2 * onGround * times * moveSpeed;
moveXTime += 1.2 * onGround * times * moveSpeed;
moveFadeTime = Mth.lerp(0.13 * times, moveFadeTime, 1);