From 7083ecd3e832914485292b01f9c8377593c2c281 Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sun, 16 Mar 2025 01:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E4=BA=BA=E6=9C=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=8A=A0=E8=BD=BD=E5=92=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98bug=EF=BC=8C=E4=B8=8Ecarry=20on=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/vehicle/DroneEntity.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java index aae230654..921d58b92 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java @@ -111,7 +111,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { return Mth.lerp(0.6f * tickDelta, pitchO, getBodyPitch()); } - @Override public boolean sendFireStarParticleOnHurt() { return false; @@ -157,7 +156,10 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { compound.putString("Controller", this.entityData.get(CONTROLLER)); compound.putInt("Ammo", this.entityData.get(AMMO)); compound.putInt("KamikazeMode", this.entityData.get(KAMIKAZE_MODE)); - compound.put("Item", this.currentItem.save(compound)); + + CompoundTag item = new CompoundTag(); + this.currentItem.save(item); + compound.put("Item", item); } @Override @@ -308,7 +310,7 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { } } } - } else if (stack.isEmpty() && player.isCrouching()) { + } else if (stack.is(ModItems.CROWBAR.get()) && player.isCrouching()) { // 返还物品 ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(ModItems.DRONE.get()));