From 8d494f6aee110d8e11ecf7d0a2a2a3b7540b22b3 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Thu, 14 Nov 2024 19:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=86=E9=9B=86=E6=91=86?= =?UTF-8?q?=E6=94=BE=E8=BF=AB=E5=87=BB=E7=82=AE=E6=97=B6=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E7=82=B8=E8=86=9B=E4=BA=8B=E6=95=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/projectile/MortarShellEntity.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java index cc0c1f4eb..b9f2cf75c 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java @@ -94,14 +94,14 @@ public class MortarShellEntity extends ThrowableItemProjectile { @Override public void onHitEntity(EntityHitResult entityHitResult) { - Entity entity = entityHitResult.getEntity(); - - entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); - - if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, this.damage, this.radius); + if (this.tickCount > 1) { + Entity entity = entityHitResult.getEntity(); + entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); + if (this.level() instanceof ServerLevel) { + ProjectileTool.causeCustomExplode(this, this.damage, this.radius); + } + this.discard(); } - this.discard(); } @Override