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

18 lines
883 B
Diff
Raw Normal View History

--- a/net/minecraft/world/item/HoneycombItem.java
+++ b/net/minecraft/world/item/HoneycombItem.java
2024-12-14 21:50:20 +01:00
@@ -74,6 +_,14 @@
return getWaxed(blockState).<InteractionResult>map(blockState1 -> {
Player player = context.getPlayer();
2024-12-14 21:50:20 +01:00
ItemStack itemInHand = context.getItemInHand();
+ // Paper start - EntityChangeBlockEvent
2024-12-14 21:50:20 +01:00
+ 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) {
2024-12-14 21:50:20 +01:00
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(serverPlayer, clickedPos, itemInHand);
}