PaperMC/paper-server/patches/sources/net/minecraft/world/item/HoneycombItem.java.patch
2024-12-14 12:50:23 -08:00

17 lines
883 B
Diff

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