Update for Minecraft 1.8

This commit is contained in:
Dinnerbone
2011-09-15 01:23:52 +01:00
parent 54bcd1c1f3
commit 5b2c774edc
107 changed files with 4415 additions and 3504 deletions

View File

@@ -49,6 +49,10 @@ public class ItemBucket extends Item {
}
if (this.a == 0) {
if (!entityhuman.c(i, j, k)) {
return itemstack;
}
if (world.getMaterial(i, j, k) == Material.WATER && world.getData(i, j, k) == 0) {
// CraftBukkit start
PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, i, j, k, -1, itemstack, Item.WATER_BUCKET);
@@ -121,6 +125,10 @@ public class ItemBucket extends Item {
++i;
}
if (!entityhuman.c(i, j, k)) {
return itemstack;
}
if (world.isEmpty(i, j, k) || !world.getMaterial(i, j, k).isBuildable()) {
// CraftBukkit start
PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, clickedX, clickedY, clickedZ, movingobjectposition.face, itemstack);
@@ -140,6 +148,10 @@ public class ItemBucket extends Item {
world.setTypeIdAndData(i, j, k, this.a, 0);
}
if (entityhuman.K.d) {
return itemstack;
}
// CraftBukkit start
CraftItemStack itemInHand = (CraftItemStack) event.getItemStack();
byte data = itemInHand.getData() == null ? (byte) 0 : itemInHand.getData().getData();