@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalEatTile.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalEatTile.java
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
import java.util.EnumSet;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -11,17 +11,17 @@
|
||||
public class PathfinderGoalEatTile extends PathfinderGoal {
|
||||
|
||||
private static final Predicate<IBlockData> a = BlockStatePredicate.a(Blocks.GRASS);
|
||||
@@ -49,7 +53,8 @@
|
||||
@@ -55,7 +59,8 @@
|
||||
BlockPosition blockposition = new BlockPosition(this.b.locX, this.b.locY, this.b.locZ);
|
||||
|
||||
if (PathfinderGoalEatTile.a.test(this.c.getType(blockposition))) {
|
||||
- if (this.c.getGameRules().getBoolean("mobGriefing")) {
|
||||
+ // CraftBukkit
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, blockposition, Blocks.AIR.getBlockData(), !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
|
||||
this.c.setAir(blockposition, false);
|
||||
this.c.b(blockposition, false);
|
||||
}
|
||||
|
||||
@@ -58,7 +63,8 @@
|
||||
@@ -64,7 +69,8 @@
|
||||
BlockPosition blockposition1 = blockposition.down();
|
||||
|
||||
if (this.c.getType(blockposition1).getBlock() == Blocks.GRASS_BLOCK) {
|
||||
|
||||
Reference in New Issue
Block a user