summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-03-18 22:57:22 +0100
committerErik Broes <erikbroes@grum.nl>2011-03-18 23:45:46 +0100
commit778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8 (patch)
tree4dc6704eda6211a8392bd140f487634790ab736f /src/main/java/net/minecraft
parent1144013362a62ea41327c4f10f2691eca9fe9688 (diff)
downloadcraftbukkit-778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8.tar
craftbukkit-778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8.tar.gz
craftbukkit-778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8.tar.lz
craftbukkit-778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8.tar.xz
craftbukkit-778079677eb0bbfd2ee888bb5dc8938f5a6b3fd8.zip
Fix BLOCK_PLACED when placing on snow/step
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 3650a925..a38bb0b5 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -67,19 +67,21 @@ public class ItemBlock extends Item {
* rather than the block touching the face we clicked on.
*/
int typeId = blockClicked.getTypeId();
- org.bukkit.block.Block replacedBlock = blockClicked.getFace(faceClicked);
+ org.bukkit.block.Block placedBlock = blockClicked.getFace(faceClicked);
if (typeId == Block.SNOW.id || (typeId == Block.STEP.id && itemstack.id == Block.STEP.id && faceClicked == BlockFace.UP))
- replacedBlock = blockClicked;
+ placedBlock = blockClicked;
- final BlockState replacedBlockState = new CraftBlockState(replacedBlock);
+ final BlockState replacedBlockState = new CraftBlockState(placedBlock);
// CraftBukkit end
if (world.a(this.a, i, j, k, false)) {
Block block = Block.byId[this.a];
// CraftBukkit start - This executes the placement of the block
- /*
+ /**
+ * @see net.minecraft.server.World#b(int i, int j, int k, int l, int i1)
+ *
* This replaces world.b(IIIII), we're doing this because we need to
* hook between the 'placement' and the informing to 'world' so we can
* sanely undo this.
@@ -90,9 +92,8 @@ public class ItemBlock extends Item {
if (world.setTypeIdAndData(i, j, k, a, a(itemstack.h()))) { // <-- world.b does this to place the block
org.bukkit.Server server = ((WorldServer) world).getServer();
Type eventType = Type.BLOCK_PLACED;
- org.bukkit.block.Block placedBlock = blockClicked.getFace(faceClicked) ;
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
- Player thePlayer = (entityhuman ==null) ? null : (Player) entityhuman.getBukkitEntity();
+ Player thePlayer = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
ChunkCoordinates chunkcoordinates = world.l();
int spawnX = chunkcoordinates.a;