From 899b9c17cc469851cbc42c5a326869e97b492de4 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Sun, 27 Jan 2013 10:44:32 -0600 Subject: 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. --- src/main/java/net/minecraft/server/ItemSkull.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/minecraft/server/ItemSkull.java') 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); -- cgit v1.2.3