mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Prevent sombra from breaking blocks when mob griefing is off
This commit is contained in:
parent
5a83227d2c
commit
30f5c73609
1 changed files with 5 additions and 3 deletions
|
@ -279,9 +279,11 @@ public class SombraEntity extends HostileEntity implements ArenaCombatant, Parti
|
||||||
if (getWorld().isClient) {
|
if (getWorld().isClient) {
|
||||||
generateBodyParticles();
|
generateBodyParticles();
|
||||||
} else {
|
} else {
|
||||||
for (BlockPos p : BlockPos.iterateOutwards(getBlockPos(), 2, 1, 2)) {
|
if (getWorld().getGameRules().get(GameRules.DO_MOB_GRIEFING).get()) {
|
||||||
if (getWorld().getBlockState(p).getLuminance() > 13) {
|
for (BlockPos p : BlockPos.iterateOutwards(getBlockPos(), 2, 1, 2)) {
|
||||||
destroyLightSource(p);
|
if (getWorld().getBlockState(p).getLuminance() > 13) {
|
||||||
|
destroyLightSource(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue