summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemBucket.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ItemBucket.patch')
-rw-r--r--nms-patches/ItemBucket.patch17
1 files changed, 7 insertions, 10 deletions
diff --git a/nms-patches/ItemBucket.patch b/nms-patches/ItemBucket.patch
index f30d0cb1..1561e69f 100644
--- a/nms-patches/ItemBucket.patch
+++ b/nms-patches/ItemBucket.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/ItemBucket.java 2014-11-28 17:43:43.221707432 +0000
-+++ src/main/java/net/minecraft/server/ItemBucket.java 2014-11-28 17:38:18.000000000 +0000
+--- /home/matt/mc-dev-private//net/minecraft/server/ItemBucket.java 2015-02-26 22:40:22.803608137 +0000
++++ src/main/java/net/minecraft/server/ItemBucket.java 2015-02-26 22:40:22.803608137 +0000
@@ -1,5 +1,12 @@
package net.minecraft.server;
@@ -58,11 +58,10 @@
}
BlockPosition blockposition1 = blockposition.shift(movingobjectposition.direction);
-@@ -53,10 +82,18 @@
- if (!entityhuman.a(blockposition1, movingobjectposition.direction, itemstack)) {
+@@ -54,9 +83,17 @@
return itemstack;
}
-+
+
+ // CraftBukkit start
+ PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), movingobjectposition.direction, itemstack);
+
@@ -70,7 +69,7 @@
+ return itemstack;
+ }
+ // CraftBukkit end
-
++
if (this.a(world, blockposition1) && !entityhuman.abilities.canInstantlyBuild) {
entityhuman.b(StatisticList.USE_ITEM_COUNT[Item.getId(this)]);
- return new ItemStack(Items.BUCKET);
@@ -78,13 +77,11 @@
}
}
}
-@@ -64,15 +101,16 @@
- return itemstack;
+@@ -65,14 +102,15 @@
}
}
--
+
- private ItemStack a(ItemStack itemstack, EntityHuman entityhuman, Item item) {
-+
+ // CraftBukkit - added ob.ItemStack result - TODO: Is this... the right way to handle this?
+ private ItemStack a(ItemStack itemstack, EntityHuman entityhuman, Item item, org.bukkit.inventory.ItemStack result) {
if (entityhuman.abilities.canInstantlyBuild) {