diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/ItemBlock.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBlock.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemBlock.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java index e3fe0132..f952b38b 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java @@ -68,11 +68,13 @@ public class ItemBlock extends Item { if (id != this.id || world.mayPlace(this.id, i, j, k, false, l, entityhuman)) { Block block = Block.byId[id]; + int j1 = this.filterData(itemstack.getData()); + int k1 = Block.byId[this.id].getPlacedData(world, i, j, k, l, f, f1, f2, j1); CraftBlockState replacedBlockState = CraftBlockState.getBlockState(world, i, j, k); world.suppressPhysics = true; - world.setTypeIdAndData(i, j, k, id, this.filterData(itemstack.getData())); + world.setTypeIdAndData(i, j, k, id, k1); org.bukkit.event.block.BlockPlaceEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, replacedBlockState, clickedX, clickedY, clickedZ); id = world.getTypeId(i, j, k); int data = world.getData(i, j, k); @@ -84,12 +86,12 @@ public class ItemBlock extends Item { } if (world.setTypeIdAndData(i, j, k, id, data)) { if (world.getTypeId(i, j, k) == id && Block.byId[id] != null) { - Block.byId[id].postPlace(world, i, j, k, l, f, f1, f2); Block.byId[id].postPlace(world, i, j, k, entityhuman); + Block.byId[this.id].postPlace(world, i, j, k, data); // CraftBukkit end } - world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.b(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F); + world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F); --itemstack.count; } |