SPIGOT-1607: Fix BlockPlaceEvent and BlockMultiPlaceEvent sometimes showing the wrong item used
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
+ // CraftBukkit start - special case for handling block placement with water lilies
|
||||
+ org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
|
||||
world.setTypeAndData(blockposition1, Blocks.WATERLILY.getBlockData(), 11);
|
||||
+ org.bukkit.event.block.BlockPlaceEvent placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockstate, blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ org.bukkit.event.block.BlockPlaceEvent placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blockstate, blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
|
||||
+ blockstate.update(true, false);
|
||||
+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
|
||||
|
||||
Reference in New Issue
Block a user