fix non player explosions not harming player/hostile mobs
This commit is contained in:
parent
bfa769d632
commit
e6061573d8
@ -181,7 +181,7 @@ public class EntityInteractEvents {
|
||||
public static boolean preventDamage(Entity entity, DamageSource source) {
|
||||
if (source.getEntity() instanceof ServerPlayer)
|
||||
return attackSimple((ServerPlayer) source.getEntity(), entity, true) != InteractionResult.PASS;
|
||||
else if (source.isExplosion() && !entity.level.isClientSide) {
|
||||
else if (source.isExplosion() && !entity.level.isClientSide && !(entity instanceof ServerPlayer || entity instanceof Enemy)) {
|
||||
IPermissionContainer claim = ClaimStorage.get((ServerLevel) entity.level).getForPermissionCheck(entity.blockPosition());
|
||||
return claim != null && !claim.canInteract(null, PermissionRegistry.EXPLOSIONS, entity.blockPosition());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user