diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-20 10:24:22 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-20 10:24:22 -0500 |
commit | b325ffc8f60de4d9f492221e057db2da1fc09060 (patch) | |
tree | 8cc65a3eb9274154be3d10479fe616f10ea7914e /src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java | |
parent | 2fc755cc6526bc3e17222608e817e2e58cccf669 (diff) | |
download | craftbukkit-b325ffc8f60de4d9f492221e057db2da1fc09060.tar craftbukkit-b325ffc8f60de4d9f492221e057db2da1fc09060.tar.gz craftbukkit-b325ffc8f60de4d9f492221e057db2da1fc09060.tar.lz craftbukkit-b325ffc8f60de4d9f492221e057db2da1fc09060.tar.xz craftbukkit-b325ffc8f60de4d9f492221e057db2da1fc09060.zip |
Handle filled buckets dispensing up and down. Fixes BUKKIT-3814
Diffstat (limited to 'src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java')
-rw-r--r-- | src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java b/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java index 5caf0bde..5bdeac93 100644 --- a/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java +++ b/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java @@ -20,13 +20,14 @@ final class DispenseBehaviorFilledBucket extends DispenseBehaviorItem { // CraftBukkit start World world = isourceblock.k(); - int i2 = i + enumfacing.c(); - int k2 = k + enumfacing.e(); - if (world.isEmpty(i2, j, k2) || world.getMaterial(i2, j, k2).isBuildable()) { + int x = i + enumfacing.c(); + int y = j + enumfacing.d(); + int z = k + enumfacing.e(); + if (world.isEmpty(x, y, z) || world.getMaterial(x, y, z).isBuildable()) { org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack); - BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); + BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z)); if (!BlockDispenser.eventFired) { world.getServer().getPluginManager().callEvent(event); } @@ -49,7 +50,7 @@ final class DispenseBehaviorFilledBucket extends DispenseBehaviorItem { } // CraftBukkit end - if (itembucket.a(isourceblock.k(), (double) i, (double) j, (double) k, i + enumfacing.c(), j, k + enumfacing.e())) { + if (itembucket.a(isourceblock.k(), (double) i, (double) j, (double) k, i + enumfacing.c(), j + enumfacing.d(), k + enumfacing.e())) { // CraftBukkit start - handle stacked buckets Item item = Item.BUCKET; if (--itemstack.count == 0) { |