From a826f45ab8a4912fc8e8c7303b01eb18fedc09f9 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Tue, 10 Sep 2024 02:17:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E8=BF=9B=E4=B8=AD?= =?UTF-8?q?=E6=89=94RGO=E6=89=8B=E9=9B=B7=E4=BC=9A=E8=A2=AB=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E5=BC=95=E7=88=86=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/projectile/RgoGrenadeEntity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java index c530e7788..96e6968cc 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java @@ -89,6 +89,8 @@ public class RgoGrenadeEntity extends ThrowableItemProjectile implements GeoEnti EntityHitResult entityResult = (EntityHitResult) result; Entity entity = entityResult.getEntity(); + if (entity == this.getOwner()) return; + 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);