diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-09 02:52:37 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-09 02:54:58 -0400 |
commit | 0c24f86a0974207d224cc873104fd14188e726d3 (patch) | |
tree | d3824e34fc1ca9289d14413148dee5a7e80874fe /src/main/java/net/minecraft | |
parent | 053e05dd3793f8580fa5eef89eb133bfdb03c176 (diff) | |
download | craftbukkit-0c24f86a0974207d224cc873104fd14188e726d3.tar craftbukkit-0c24f86a0974207d224cc873104fd14188e726d3.tar.gz craftbukkit-0c24f86a0974207d224cc873104fd14188e726d3.tar.lz craftbukkit-0c24f86a0974207d224cc873104fd14188e726d3.tar.xz craftbukkit-0c24f86a0974207d224cc873104fd14188e726d3.zip |
Fixed redstone current being sent even if a BlockPlace was cancelled.
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemRedstone.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/ItemRedstone.java b/src/main/java/net/minecraft/server/ItemRedstone.java index 631d93a7..4ef590c7 100644 --- a/src/main/java/net/minecraft/server/ItemRedstone.java +++ b/src/main/java/net/minecraft/server/ItemRedstone.java @@ -49,8 +49,6 @@ public class ItemRedstone extends Item { if (Block.REDSTONE_WIRE.canPlace(world, i, j, k)) { BlockState blockState = CraftBlockState.getBlockState(world, i, j, k); // CraftBukkit - world.setTypeId(i, j, k, Block.REDSTONE_WIRE.id); - // CraftBukkit start - redstone BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, clickedX, clickedY, clickedZ, Block.REDSTONE_WIRE); @@ -58,6 +56,8 @@ public class ItemRedstone extends Item { event.getBlockPlaced().setTypeIdAndData(blockState.getTypeId(), blockState.getRawData(), false); return false; } + + world.setTypeId(i, j, k, Block.REDSTONE_WIRE.id); // CraftBukkit - Must take place after BlockPlaceEvent // CraftBukkit end --itemstack.count; // CraftBukkit - ORDER MATTERS |