From 1be3bd058faf4fc0f2a351e92a99786e53f770b9 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 1 Mar 2016 21:37:08 +0000 Subject: SPIGOT-1607: Fix BlockPlaceEvent and BlockMultiPlaceEvent sometimes showing the wrong item used --- nms-patches/ItemStack.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nms-patches/ItemStack.patch') diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch index 58546163..b271b49b 100644 --- a/nms-patches/ItemStack.patch +++ b/nms-patches/ItemStack.patch @@ -97,9 +97,9 @@ + List blocks = (List) world.capturedBlockStates.clone(); + world.capturedBlockStates.clear(); + if (blocks.size() > 1) { -+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); ++ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); + } else if (blocks.size() == 1) { -+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ()); ++ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ()); + } + + if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) { -- cgit v1.2.3