Update CraftBukkit to Minecraft 1.5

This commit is contained in:
Travis Watkins
2013-03-13 17:33:27 -05:00
parent ba6e4c38cf
commit 83d29e461c
246 changed files with 8499 additions and 6759 deletions

View File

@@ -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
}