summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-03-13 17:33:27 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-15 13:28:59 -0500
commit83d29e461c85733f0113b6eb19db6e3b42da2949 (patch)
treeb3063a1c28f478ab368d5ba3413a842def68c28f /src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
parentba6e4c38cfa98ad291974195cc46d70a4f138ac1 (diff)
downloadcraftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.gz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.lz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.xz
craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.zip
Update CraftBukkit to Minecraft 1.5
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalEatTile.java')
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalEatTile.java11
1 files changed, 5 insertions, 6 deletions
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
}