防空炮弹不会击落防空炮弹
This commit is contained in:
parent
fc8832ae8d
commit
65c5151c4b
1 changed files with 3 additions and 1 deletions
|
@ -104,8 +104,10 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G
|
|||
|
||||
@Override
|
||||
protected void onHitEntity(@NotNull EntityHitResult result) {
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
Entity entity = result.getEntity();
|
||||
if (result.getEntity() instanceof SmallCannonShellEntity) return;
|
||||
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
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