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 | |
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')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockFire.java | 7 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java | 11 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java index 16ea6d01..aa818d61 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -108,11 +108,6 @@ public class BlockFire extends Block { this.a(world, i, j, k - 1, 300 + b0, random, l); this.a(world, i, j, k + 1, 300 + b0, random, l); - // CraftBukkit start - call to stop spread of fire - org.bukkit.Server server = world.getServer(); - org.bukkit.World bworld = world.getWorld(); - // CraftBukkit end - for (int i1 = i - 1; i1 <= i + 1; ++i1) { for (int j1 = k - 1; j1 <= k + 1; ++j1) { for (int k1 = j - 1; k1 <= j + 4; ++k1) { @@ -145,6 +140,8 @@ public class BlockFire extends Block { continue; } + org.bukkit.Server server = world.getServer(); + org.bukkit.World bworld = world.getWorld(); org.bukkit.block.BlockState blockState = bworld.getBlockAt(i1, k1, j1).getState(); blockState.setTypeId(this.id); blockState.setData(new org.bukkit.material.MaterialData(this.id, (byte) k2)); 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) { |