diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBucket.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemBucket.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java index e1c2866a..6cb74b92 100644 --- a/src/main/java/net/minecraft/server/ItemBucket.java +++ b/src/main/java/net/minecraft/server/ItemBucket.java @@ -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(); |