summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/ItemBlock.java
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-05-14 16:29:42 +0200
committerErik Broes <erikbroes@grum.nl>2011-05-15 13:41:46 +0200
commit309846d732849b68e382c53bf3a0d7a6dfd82579 (patch)
tree020932a024cd2fb20895f5834a2bde7dbdfea583 /src/main/java/net/minecraft/server/ItemBlock.java
parente54d8c33529b9495b9ca1a610dc2ff9fc5ac84b5 (diff)
downloadcraftbukkit-309846d732849b68e382c53bf3a0d7a6dfd82579.tar
craftbukkit-309846d732849b68e382c53bf3a0d7a6dfd82579.tar.gz
craftbukkit-309846d732849b68e382c53bf3a0d7a6dfd82579.tar.lz
craftbukkit-309846d732849b68e382c53bf3a0d7a6dfd82579.tar.xz
craftbukkit-309846d732849b68e382c53bf3a0d7a6dfd82579.zip
Whitespace + general cleanup
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBlock.java')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index d70a880d..72736720 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -18,7 +18,7 @@ public class ItemBlock extends Item {
}
public boolean a(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l) {
- int clickedX = i, clickedY = j, clickedZ = k; // CraftBukkit;
+ int clickedX = i, clickedY = j, clickedZ = k; // CraftBukkit
if (world.getTypeId(i, j, k) == Block.SNOW.id) {
l = 0;
@@ -61,21 +61,19 @@ public class ItemBlock extends Item {
replacedBlockState = CraftBlockState.getBlockState(world, i, j - 1, k);
}
/**
- * @see net.minecraft.server.World#setTypeIdAndData(int i, int j, int k, int l, int i1)
- *
- * This replaces world.setTypeIdAndData(IIIII), we're doing this because we need to
- * hook between the 'placement' and the informing to 'world' so we can
- * sanely undo this.
- *
- * Whenever the call to 'world.setTypeIdAndData' changes we need to figure out again what to
- * replace this with.
- */
+ * @see net.minecraft.server.World#setTypeIdAndData(int i, int j, int k, int l, int i1)
+ *
+ * This replaces world.setTypeIdAndData(IIIII), we're doing this because we need to
+ * hook between the 'placement' and the informing to 'world' so we can
+ * sanely undo this.
+ *
+ * Whenever the call to 'world.setTypeIdAndData' changes we need to figure out again what to
+ * replace this with.
+ */
if (world.setRawTypeIdAndData(i, j, k, this.id, this.filterData(itemstack.getData()))) { // <-- world.setTypeIdAndData does this to place the block
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, replacedBlockState, clickedX, clickedY, clickedZ, block);
if (event.isCancelled() || !event.canBuild()) {
- // CraftBukkit Undo!
-
if ((this.id == Block.STEP.id) && (world.getTypeId(i, j - 1, k) == Block.DOUBLE_STEP.id) && (world.getTypeId(i, j, k) == 0)) {
// Half steps automatically set the block below to a double
world.setTypeId(i, j - 1, k, 44);