@@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/PathfinderGoalEatTile.java 2014-11-28 17:43:43.285707431 +0000
|
||||
+++ src/main/java/net/minecraft/server/PathfinderGoalEatTile.java 2014-11-28 17:38:18.000000000 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/PathfinderGoalEatTile.java 2015-02-26 22:40:22.943608136 +0000
|
||||
+++ src/main/java/net/minecraft/server/PathfinderGoalEatTile.java 2015-02-26 22:40:22.943608136 +0000
|
||||
@@ -3,6 +3,11 @@
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
@@ -11,7 +11,7 @@
|
||||
+
|
||||
public class PathfinderGoalEatTile extends PathfinderGoal {
|
||||
|
||||
private static final Predicate b = BlockStatePredicate.a((Block) Blocks.TALLGRASS).a(BlockLongGrass.TYPE, Predicates.equalTo(EnumTallGrassType.GRASS));
|
||||
private static final Predicate<IBlockData> b = BlockStatePredicate.a((Block) Blocks.TALLGRASS).a(BlockLongGrass.TYPE, Predicates.equalTo(BlockLongGrass.EnumTallGrassType.GRASS));
|
||||
@@ -50,7 +55,8 @@
|
||||
BlockPosition blockposition = new BlockPosition(this.c.locX, this.c.locY, this.c.locZ);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (this.d.getType(blockposition1).getBlock() == Blocks.GRASS) {
|
||||
- if (this.d.getGameRules().getBoolean("mobGriefing")) {
|
||||
+ // CraftBukkit
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.c, this.c.world.getWorld().getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()), Material.DIRT, !this.d.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.c, this.c.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), Material.AIR, !this.d.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
|
||||
this.d.triggerEffect(2001, blockposition1, Block.getId(Blocks.GRASS));
|
||||
this.d.setTypeAndData(blockposition1, Blocks.DIRT.getBlockData(), 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user