From 83d29e461c85733f0113b6eb19db6e3b42da2949 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Wed, 13 Mar 2013 17:33:27 -0500 Subject: Update CraftBukkit to Minecraft 1.5 --- src/main/java/net/minecraft/server/PathfinderGoalEatTile.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/java/net/minecraft/server/PathfinderGoalEatTile.java') diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java index 68ad1063..1feced1a 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java @@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal { } public boolean a() { - if (this.b.aB().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { + if (this.b.aE().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { return false; } else { int i = MathHelper.floor(this.b.locX); @@ -57,17 +57,16 @@ public class PathfinderGoalEatTile extends PathfinderGoal { if (this.c.getTypeId(i, j, k) == Block.LONG_GRASS.id) { // CraftBukkit start if (!CraftEventFactory.callEntityChangeBlockEvent(this.b.getBukkitEntity(), this.b.world.getWorld().getBlockAt(i, j, k), Material.AIR).isCancelled()) { - this.c.triggerEffect(2001, i, j, k, Block.LONG_GRASS.id + 4096); - this.c.setTypeId(i, j, k, 0); - this.b.aH(); + this.c.setAir(i, j, k, false); + this.b.aK(); } // CraftBukkit end } else if (this.c.getTypeId(i, j - 1, k) == Block.GRASS.id) { // CraftBukkit start if (!CraftEventFactory.callEntityChangeBlockEvent(this.b.getBukkitEntity(), this.b.world.getWorld().getBlockAt(i, j - 1, k), Material.DIRT).isCancelled()) { this.c.triggerEffect(2001, i, j - 1, k, Block.GRASS.id); - this.c.setTypeId(i, j - 1, k, Block.DIRT.id); - this.b.aH(); + this.c.setTypeIdAndData(i, j - 1, k, Block.DIRT.id, 0, 2); + this.b.aK(); } // CraftBukkit end } -- cgit v1.2.3