diff options
author | Aikar <aikar@aikar.co> | 2014-02-07 23:21:16 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-02-09 02:40:43 -0600 |
commit | ce4b13c1a5c0211e53614476c39ac6b4ad6c9572 (patch) | |
tree | e9e9cd93c395a6d4358ec4745425406aad13895a /src | |
parent | 219f4e2c25ab8e0e0c79341d9ab49182c0c4f800 (diff) | |
download | craftbukkit-ce4b13c1a5c0211e53614476c39ac6b4ad6c9572.tar craftbukkit-ce4b13c1a5c0211e53614476c39ac6b4ad6c9572.tar.gz craftbukkit-ce4b13c1a5c0211e53614476c39ac6b4ad6c9572.tar.lz craftbukkit-ce4b13c1a5c0211e53614476c39ac6b4ad6c9572.tar.xz craftbukkit-ce4b13c1a5c0211e53614476c39ac6b4ad6c9572.zip |
Readd BlockPlaceEvent for half slab to full block. Fixes BUKKIT-5390
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemStep.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/ItemStep.java b/src/main/java/net/minecraft/server/ItemStep.java index 6448f352..56fb09e1 100644 --- a/src/main/java/net/minecraft/server/ItemStep.java +++ b/src/main/java/net/minecraft/server/ItemStep.java @@ -54,6 +54,7 @@ public class ItemStep extends ItemBlock { } private boolean a(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l) { + final int clickedX = i, clickedY = j, clickedZ = k; // CraftBukkit if (l == 0) { --j; } @@ -83,8 +84,11 @@ public class ItemStep extends ItemBlock { int j1 = i1 & 7; if (block == this.c && j1 == itemstack.getData()) { - if (world.b(this.d.a(world, i, j, k)) && world.setTypeAndData(i, j, k, this.d, j1, 3)) { - world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this.d.stepSound.getPlaceSound(), (this.d.stepSound.getVolume1() + 1.0F) / 2.0F, this.d.stepSound.getVolume2() * 0.8F); + // CraftBukkit start - world.setTypeIdAndData -> processBlockPlace() + // if (world.b(this.d.a(world, i, j, k)) && world.setTypeAndData(i, j, k, this.d, j1, 3)) { + if (world.b(this.d.a(world, i, j, k)) && processBlockPlace(world, entityhuman, null, i, j, k, this.d, j1, clickedX, clickedY, clickedZ)) { + // world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this.d.stepSound.getPlaceSound(), (this.d.stepSound.getVolume1() + 1.0F) / 2.0F, this.d.stepSound.getVolume2() * 0.8F); + // CraftBukkit end --itemstack.count; } |