修复拉栓tagBUG
This commit is contained in:
parent
cf21a39105
commit
1dbae88b63
2 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ public class GunEventHandler {
|
||||||
&& !stack.getOrCreateTag().getBoolean("charging")
|
&& !stack.getOrCreateTag().getBoolean("charging")
|
||||||
&& stack.getOrCreateTag().getInt("ammo") > 0
|
&& stack.getOrCreateTag().getInt("ammo") > 0
|
||||||
&& !player.getCooldowns().isOnCooldown(stack.getItem())
|
&& !player.getCooldowns().isOnCooldown(stack.getItem())
|
||||||
&& stack.getOrCreateTag().getDouble("need_bolt_action") == 0) {
|
&& !stack.getOrCreateTag().getBoolean("need_bolt_action")) {
|
||||||
|
|
||||||
playGunSounds(player);
|
playGunSounds(player);
|
||||||
|
|
||||||
|
|
|
@ -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 (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"));
|
handItem.getOrCreateTag().putInt("bolt_action_anim", handItem.getOrCreateTag().getInt("bolt_action_time"));
|
||||||
GunEventHandler.playGunBoltSounds(player);
|
GunEventHandler.playGunBoltSounds(player);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue