From 07a11ba96f75caedaa4a63b6ef1d18644c69b4b6 Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Fri, 4 Jul 2025 00:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E7=81=AB=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=88=A4=E6=96=AD=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, 3 insertions(+), 5 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 350b63389..b4e7bc0df 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/DroneEntity.java @@ -232,14 +232,13 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), controller), 0.25f + (float) (2 * lastTickSpeed)); } - if (this.fire) { - if (this.entityData.get(AMMO) > 0) { + if (this.fire && this.entityData.get(AMMO) > 0) { + if (!this.entityData.get(IS_KAMIKAZE)) { this.entityData.set(AMMO, this.entityData.get(AMMO) - 1); if (controller != null && this.level() instanceof ServerLevel) { droneDrop(controller); } - } - if (!this.entityData.get(DISPLAY_ENTITY).isEmpty()) { + } else { if (controller != null) { var stack = controller.getMainHandItem(); if (stack.is(ModItems.MONITOR.get())) { @@ -249,7 +248,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { } this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), controller), 10000); } - } this.fire = false; }