玩家携带创造弹药盒时,坦克退弹不会补充到库存当中
This commit is contained in:
parent
2a598c81a0
commit
512cddf520
1 changed files with 3 additions and 1 deletions
|
@ -676,7 +676,9 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
@Override
|
||||
public void changeWeapon(int scroll) {
|
||||
if (entityData.get(LOADED_AMMO) > 0) {
|
||||
this.insertItem(getCurrentAmmoItem(), 1);
|
||||
if (this.getFirstPassenger() instanceof Player player && !player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get()))) {
|
||||
this.insertItem(getCurrentAmmoItem(), 1);
|
||||
}
|
||||
entityData.set(LOADED_AMMO, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue