diff options
author | feildmaster <admin@feildmaster.com> | 2013-01-27 10:44:32 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-27 10:44:32 -0600 |
commit | 899b9c17cc469851cbc42c5a326869e97b492de4 (patch) | |
tree | 1192ebe54aa2e95be9823254bb7cda06bdf634d9 /src/main/java/net/minecraft/server/ItemSkull.java | |
parent | 528bbbdcd896e67067bcf53b95cadb9dc0081ebf (diff) | |
download | craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.gz craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.lz craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.tar.xz craftbukkit-899b9c17cc469851cbc42c5a326869e97b492de4.zip |
Direct all BlockPlaceEvents to a singular location. Fixes BUKKIT-3438
By having a single function to process BlockPlacement logic, we make
it so that there is consistent behavior throughout all BlockPlace
events. This should allow for easier troubleshooting and less diffs
in source.
This also fixes BUKKIT-3463 by including the correct coordinates that
were clicked to the event.
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemSkull.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemSkull.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemSkull.java b/src/main/java/net/minecraft/server/ItemSkull.java index bf2cd4f3..bd2fe456 100644 --- a/src/main/java/net/minecraft/server/ItemSkull.java +++ b/src/main/java/net/minecraft/server/ItemSkull.java @@ -13,6 +13,7 @@ public class ItemSkull extends Item { } public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) { + final int clickedX = i, clickedY = j, clickedZ = k; // CraftBukkit if (l == 0) { return false; } else if (!world.getMaterial(i, j, k).isBuildable()) { @@ -45,7 +46,7 @@ public class ItemSkull extends Item { } else { // CraftBukkit start - handle in ItemBlock // world.setTypeIdAndData(i, j, k, Block.SKULL.id, l); - if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Block.SKULL.id, l)) { + if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Block.SKULL.id, l, clickedX, clickedY, clickedZ)) { return false; } l = world.getData(i, j, k); |