From 512cddf52045bb88c91eb21471d1ebe0c2d3c608 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Tue, 4 Mar 2025 01:33:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E6=90=BA=E5=B8=A6=E5=88=9B?= =?UTF-8?q?=E9=80=A0=E5=BC=B9=E8=8D=AF=E7=9B=92=E6=97=B6=EF=BC=8C=E5=9D=A6?= =?UTF-8?q?=E5=85=8B=E9=80=80=E5=BC=B9=E4=B8=8D=E4=BC=9A=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=88=B0=E5=BA=93=E5=AD=98=E5=BD=93=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java index 2cdf69a65..6d86d7004 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -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); }