From 65c5151c4be0a47a017be52121178d07276a52ad Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Fri, 2 May 2025 17:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E7=A9=BA=E7=82=AE=E5=BC=B9=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E5=87=BB=E8=90=BD=E9=98=B2=E7=A9=BA=E7=82=AE=E5=BC=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/projectile/SmallCannonShellEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java index 042239fb8..613c0d165 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java @@ -104,8 +104,10 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G @Override protected void onHitEntity(@NotNull EntityHitResult result) { + Entity entity = result.getEntity(); + if (result.getEntity() instanceof SmallCannonShellEntity) return; + if (this.level() instanceof ServerLevel) { - Entity entity = result.getEntity(); if (this.getOwner() instanceof LivingEntity living) { if (!living.level().isClientSide() && living instanceof ServerPlayer player) { living.level().playSound(null, living.blockPosition(), ModSounds.INDICATION.get(), SoundSource.VOICE, 1, 1);