Also call setPlacedBy, used by some block entities (like player skull) to update properties

Dieser Commit ist enthalten in:
Moulberry 2024-01-13 19:06:11 +08:00
Ursprung d83cc8ca06
Commit 2acc42b125

Datei anzeigen

@ -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) {