mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue