PaperMC/paper-server/patches/sources/net/minecraft/world/item/HoneycombItem.java.patch

18 lines
848 B
Diff
Raw Normal View History

--- a/net/minecraft/world/item/HoneycombItem.java
+++ b/net/minecraft/world/item/HoneycombItem.java
@@ -74,6 +74,14 @@
return getWaxed(blockState).map(state -> {
Player player = context.getPlayer();
ItemStack itemStack = context.getItemInHand();
+ // Paper start - EntityChangeBlockEvent
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, state)) {
+ if (!player.isCreative()) {
+ player.containerMenu.sendAllDataToRemote();
+ }
+ return InteractionResult.PASS;
+ }
+ // Paper end
if (player instanceof ServerPlayer serverPlayer) {
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(serverPlayer, blockPos, itemStack);
}