@@ -15,9 +15,9 @@
|
||||
BlockPosition blockposition = new BlockPosition(this.b);
|
||||
|
||||
if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) {
|
||||
- if (this.c.getGameRules().getBoolean("mobGriefing")) {
|
||||
- if (this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
+ // CraftBukkit
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
|
||||
this.c.b(blockposition, false);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
BlockPosition blockposition1 = blockposition.down();
|
||||
|
||||
if (this.c.getType(blockposition1).getBlock() == Blocks.GRASS_BLOCK) {
|
||||
- if (this.c.getGameRules().getBoolean("mobGriefing")) {
|
||||
- if (this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
+ // CraftBukkit
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) {
|
||||
this.c.triggerEffect(2001, blockposition1, Block.getCombinedId(Blocks.GRASS_BLOCK.getBlockData()));
|
||||
this.c.setTypeAndData(blockposition1, Blocks.DIRT.getBlockData(), 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user