summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/ItemBlock.java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-05-26 13:48:22 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-05-26 13:48:22 +0100
commit6903f2024217f0959c015e76b23297af8e3b573f (patch)
tree690bf275ce19c655bd64eea05be231ed0c318fd6 /src/main/java/net/minecraft/server/ItemBlock.java
parentf463453d73249fe73cf3e23ed37e6cee870c8bf4 (diff)
downloadcraftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.gz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.lz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.tar.xz
craftbukkit-6903f2024217f0959c015e76b23297af8e3b573f.zip
Implemented 1.6!
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemBlock.java')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 72736720..b123fdf2 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -50,7 +50,9 @@ public class ItemBlock extends Item {
if (itemstack.count == 0) {
return false;
- } else if (world.a(this.id, i, j, k, false)) {
+ } else if (j == 127 && Block.byId[this.id].material.isBuildable()) {
+ return false;
+ } else if (world.a(this.id, i, j, k, false, l)) {
Block block = Block.byId[this.id];
// CraftBukkit start - This executes the placement of the block
@@ -87,16 +89,17 @@ public class ItemBlock extends Item {
world.setTypeIdAndData(i, j, k, replacedBlockState.getTypeId(), replacedBlockState.getRawData());
}
+ return true;
- } else {
- world.update(i, j, k, this.id); // <-- world.setTypeIdAndData does this on success (tell the world)
-
- Block.byId[this.id].postPlace(world, i, j, k, l);
- Block.byId[this.id].postPlace(world, i, j, k, entityhuman);
- world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.getName(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F);
- --itemstack.count;
}
+ world.update(i, j, k, this.id); // <-- world.setTypeIdAndData does this on success (tell the world)
+
// CraftBukkit end
+
+ Block.byId[this.id].postPlace(world, i, j, k, l);
+ Block.byId[this.id].postPlace(world, i, j, k, entityhuman);
+ world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), block.stepSound.getName(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F);
+ --itemstack.count;
}
return true;
@@ -106,6 +109,6 @@ public class ItemBlock extends Item {
}
public String a() {
- return Block.byId[this.id].f();
+ return Block.byId[this.id].h();
}
}