mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update for Minecraft 1.8
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user