From 369169ec75eafae628f8f05e7fc0edb554dbc71c Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Fri, 14 Feb 2025 17:14:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=98=B2=E5=BE=A1=E5=A1=94?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/vehicle/LaserTowerEntity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/LaserTowerEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/LaserTowerEntity.java index b6a6779f4..eaaddedb7 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/LaserTowerEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/LaserTowerEntity.java @@ -280,6 +280,10 @@ public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity, Entity target = EntityFindUtil.findEntity(level(), entityData.get(TARGET_UUID)); if (target != null) { + if (target instanceof LivingEntity living && living.getHealth() <= 0) { + entityData.set(TARGET_UUID, "none"); + return; + } Vec3 barrelRootPos = new Vec3(this.getX(), this.getY() + 1.390625f, this.getZ()); Vec3 targetVec = barrelRootPos.vectorTo(target.getEyePosition()).normalize();