diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-12-01 21:00:01 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-12-01 21:03:22 +0100 |
commit | 51f724f24d73ef59d0c4c2b0765eb18962b46731 (patch) | |
tree | bd986e83615c6e830bad13cc896fceed46d71cbf /src/main/java/net/minecraft/server/ItemBlock.java | |
parent | df935a5eed0e493fcc418d13e64a41f444ae6b6c (diff) | |
download | craftbukkit-51f724f24d73ef59d0c4c2b0765eb18962b46731.tar craftbukkit-51f724f24d73ef59d0c4c2b0765eb18962b46731.tar.gz craftbukkit-51f724f24d73ef59d0c4c2b0765eb18962b46731.tar.lz craftbukkit-51f724f24d73ef59d0c4c2b0765eb18962b46731.tar.xz craftbukkit-51f724f24d73ef59d0c4c2b0765eb18962b46731.zip |
Fix missing data-value when placing a stair-block (somehow gets set after the fact) - Fixes BUKKIT-40
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBlock.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemBlock.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java index 6d8c2006..5d161a87 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java @@ -89,6 +89,11 @@ public class ItemBlock extends Item { * replace this with. */ if (world.setRawTypeIdAndData(i, j, k, this.id, this.filterData(itemstack.getData()))) { // <-- world.setTypeIdAndData does this to place the block + // Make sure the block-rotation already gets set before we call the event + if (Block.byId[this.id] instanceof BlockStairs) { + Block.byId[this.id].postPlace(world, i, j, k, entityhuman); + } + BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, eventUseBlockBelow ? blockStateBelow : replacedBlockState, clickedX, clickedY, clickedZ, block); if (event.isCancelled() || !event.canBuild()) { |