优化跑射的判定
This commit is contained in:
parent
99b690238e
commit
2410973580
1 changed files with 5 additions and 2 deletions
|
@ -257,11 +257,14 @@ public class PlayerEventHandler {
|
||||||
player.getPersistentData().putDouble("noRun", 20);
|
player.getPersistentData().putDouble("noRun", 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).holdFire) {
|
||||||
|
player.getPersistentData().putDouble("noRun", 10);
|
||||||
|
}
|
||||||
|
|
||||||
if (player.isShiftKeyDown()
|
if (player.isShiftKeyDown()
|
||||||
|| player.isPassenger()
|
|| player.isPassenger()
|
||||||
|| player.isInWater()
|
|| player.isInWater()
|
||||||
|| (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom
|
|| (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||||
|| (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).holdFire) {
|
|
||||||
player.getPersistentData().putDouble("noRun", 3);
|
player.getPersistentData().putDouble("noRun", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue