From d021cce8f053f8a72186af5eadc90bf9d35bb177 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Tue, 14 Jan 2025 20:44:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BD=BD=E5=85=B7=E8=A2=AB?= =?UTF-8?q?=E5=87=BB=E6=AF=81=E4=BC=A4=E5=AE=B3=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=82=AE=E7=9A=84=E8=A2=AB=E7=86=8F=E9=BB=91?= =?UTF-8?q?=E5=9B=BE=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/vehicle/Ah6Entity.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java index 0ab2d49f1..b64b1d970 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -424,22 +424,22 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli living.hurt(ModDamageTypes.causeAirCrashDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); } } - } + } else { + List passengers = this.getPassengers(); + for (var entity : passengers) { + if (entity instanceof LivingEntity living) { + var tempAttacker = living == attacker ? null : attacker; - List passengers = this.getPassengers(); - for (var entity : passengers) { - if (entity instanceof LivingEntity living) { - var tempAttacker = living == attacker ? null : attacker; - - living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); - living.invulnerableTime = 0; - living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); - living.invulnerableTime = 0; - living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); - living.invulnerableTime = 0; - living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); - living.invulnerableTime = 0; - living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + living.invulnerableTime = 0; + living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + living.invulnerableTime = 0; + living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + living.invulnerableTime = 0; + living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + living.invulnerableTime = 0; + living.hurt(ModDamageTypes.causeVehicleExplosionDamage(this.level().registryAccess(), null, tempAttacker), Integer.MAX_VALUE); + } } }