修复拉栓tagBUG

This commit is contained in:
Atsuihsio 2024-07-16 01:31:38 +08:00
parent cf21a39105
commit 1dbae88b63
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ public class GunEventHandler {
&& !stack.getOrCreateTag().getBoolean("charging")
&& stack.getOrCreateTag().getInt("ammo") > 0
&& !player.getCooldowns().isOnCooldown(stack.getItem())
&& stack.getOrCreateTag().getDouble("need_bolt_action") == 0) {
&& !stack.getOrCreateTag().getBoolean("need_bolt_action")) {
playGunSounds(player);

View file

@ -127,7 +127,7 @@ public class FireMessage {
// 栓动武器左键手动拉栓
if (tag.getInt("bolt_action_time") > 0 && tag.getInt("ammo") > 0 && tag.getInt("bolt_action_anim") == 0) {
if (!player.getCooldowns().isOnCooldown(handItem.getItem()) && handItem.getOrCreateTag().getDouble("need_bolt_action") == 1) {
if (!player.getCooldowns().isOnCooldown(handItem.getItem()) && handItem.getOrCreateTag().getBoolean("need_bolt_action")) {
handItem.getOrCreateTag().putInt("bolt_action_anim", handItem.getOrCreateTag().getInt("bolt_action_time"));
GunEventHandler.playGunBoltSounds(player);
}