Silverfish go into blocks when mobGriefing set to false
When I type in the command /gamerule mobGriefing false, it works as normally. However, I have noticed that even when this is set to false, silverfish can still make stone bricks, cobblestone, etc. into monster eggs, and I do believe this is a mob griefing my world.
Environment
Windows 8
Created Issue:
Silverfish go into blocks when mobGriefing set to false
When I type in the command /gamerule mobGriefing false, it works as normally. However, I have noticed that even when this is set to false, silverfish can still make stone bricks, cobblestone, etc. into monster eggs, and I do believe this is a mob griefing my world.
Environment
Windows 8
relates to
When mobGriefing gamerule is false, silverfish won't even move, although will attack when on survival mode. Most likely caused by the fix of MC-80586.
Code analysis by [Mod] Neko:
The reason for this is the Silverfish first checks if mobGriefing is false, if so, the code returns false and the Silverfish cannot attempt to path find.
static class AIHideInStone extends EntityAIWander { public boolean shouldExecute() { if (!this.silverfish.worldObj.getGameRules().getBoolean("mobGriefing")) { return false; } else if (this.silverfish.getAttackTarget() != null) { return false; } else if (!this.silverfish.getNavigator().noPath()) { return false; } else //... } }
Regression of
MC-7449Can confirm, should be trivial fix.