public class PathfinderGoalEatTile extends PathfinderGoal {
private static final Predicate b = BlockStatePredicate.a((Block) Blocks.TALLGRASS).a(BlockLongGrass.TYPE, Predicates.equalTo(EnumTallGrassType.GRASS));
@@ -50,7 +55,8 @@
BlockPosition blockposition = new BlockPosition(this.c.locX, this.c.locY, this.c.locZ);
if (PathfinderGoalEatTile.b.apply(this.d.getType(blockposition))) {
- if (this.d.getGameRules().getBoolean("mobGriefing")) {
+ // CraftBukkit
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.c, this.c.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), Material.AIR, !this.d.getGameRules().getBoolean("mobGriefing")).isCancelled()) {