From 2acc42b1255bcd5e1c61b4b3fb12a8c07c93b73b Mon Sep 17 00:00:00 2001 From: Moulberry Date: Sat, 13 Jan 2024 19:06:11 +0800 Subject: [PATCH] Also call setPlacedBy, used by some block entities (like player skull) to update properties --- .../com/moulberry/axiom/packet/SetBlockPacketListener.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moulberry/axiom/packet/SetBlockPacketListener.java b/src/main/java/com/moulberry/axiom/packet/SetBlockPacketListener.java index 78da702..493249a 100644 --- a/src/main/java/com/moulberry/axiom/packet/SetBlockPacketListener.java +++ b/src/main/java/com/moulberry/axiom/packet/SetBlockPacketListener.java @@ -257,7 +257,12 @@ public class SetBlockPacketListener implements PluginMessageListener { } if (!breaking) { - BlockItem.updateCustomBlockEntityTag(player.level(), player, blockPlaceContext.getClickedPos(), player.getItemInHand(hand)); + BlockPos clickedPos = blockPlaceContext.getClickedPos(); + ItemStack inHand = player.getItemInHand(hand); + BlockState blockState = player.level().getBlockState(clickedPos); + + BlockItem.updateCustomBlockEntityTag(player.level(), player, clickedPos, inHand); + blockState.getBlock().setPlacedBy(player.level(), clickedPos, blockState, player, inHand); } if (sequenceId >= 0) {