修复前进中扔RGO手雷会被自己引爆的bug
This commit is contained in:
parent
d024765666
commit
a826f45ab8
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue