From 30f5c7360960aea7ba25f4573db4493f3fe6a055 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 4 Sep 2023 23:36:51 +0100 Subject: [PATCH] Prevent sombra from breaking blocks when mob griefing is off --- .../minelittlepony/unicopia/entity/mob/SombraEntity.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/mob/SombraEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/mob/SombraEntity.java index 38b63835..f9e92d12 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/mob/SombraEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/mob/SombraEntity.java @@ -279,9 +279,11 @@ public class SombraEntity extends HostileEntity implements ArenaCombatant, Parti if (getWorld().isClient) { generateBodyParticles(); } else { - for (BlockPos p : BlockPos.iterateOutwards(getBlockPos(), 2, 1, 2)) { - if (getWorld().getBlockState(p).getLuminance() > 13) { - destroyLightSource(p); + if (getWorld().getGameRules().get(GameRules.DO_MOB_GRIEFING).get()) { + for (BlockPos p : BlockPos.iterateOutwards(getBlockPos(), 2, 1, 2)) { + if (getWorld().getBlockState(p).getLuminance() > 13) { + destroyLightSource(p); + } } }