summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-01-20 02:13:51 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-01-20 02:13:51 +0000
commit45381e17dc815ffca2a301f206362f094d4c585c (patch)
tree4665e5556433f4caa1b5e84a69fe0c79fe4b4899 /src/main/java
parent2c5dd11c62fdac5a5841318411fd09b54606e3cd (diff)
downloadcraftbukkit-45381e17dc815ffca2a301f206362f094d4c585c.tar
craftbukkit-45381e17dc815ffca2a301f206362f094d4c585c.tar.gz
craftbukkit-45381e17dc815ffca2a301f206362f094d4c585c.tar.lz
craftbukkit-45381e17dc815ffca2a301f206362f094d4c585c.tar.xz
craftbukkit-45381e17dc815ffca2a301f206362f094d4c585c.zip
Fixed half-step placing
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index f7da7c16..1e45482f 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -66,7 +66,7 @@ public class ItemBlock extends Item {
Block block = Block.m[a];
// This executes the placement of the block
- if (world.e(i, j, k, a)) {
+ if (world.b(i, j, k, a)) {
CraftBlock placedBlock = (CraftBlock) blockClicked.getFace(faceClicked) ;
CraftItemStack itemInHand = new CraftItemStack(itemstack);
CraftPlayer thePlayer = new CraftPlayer(((WorldServer) world).getServer(), (EntityPlayerMP) entityplayer);
@@ -82,14 +82,18 @@ public class ItemBlock extends Item {
if (bpe.isCancelled() || !bpe.canBuild()) {
// CraftBukkit Undo!
- // Specialcase iceblocks, replace with 'glass' first (so it doesn't explode into water)
if (this.a == 79) {
+ // Ice will explode if we set straight to 0
world.b(i, j, k, 20);
+ } else if ((this.a == 44) && (world.a(i, j - 1, k) == 43) && (world.a(i, j, k) == 0)) {
+ // Half steps automatically set the block below to a double
+ world.b(i, j - 1, k, 44);
}
+
world.b(i, j, k, oldMaterial);
world.d(i, j, k, oldData);
} else {
- world.b(i, j, k, a, a(itemstack.h()));
+ world.c(i, j, k, a(itemstack.h()));
Block.m[a].c(world, i, j, k, l);
Block.m[a].a(world, i, j, k, ((EntityLiving) (entityplayer)));