3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-17 05:40:06 +01:00

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 53ee4ee813
Commit f81bf5c8c5

Datei anzeigen

@ -257,7 +257,12 @@ public class SetBlockPacketListener implements PluginMessageListener {
} }
if (!breaking) { 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) { if (sequenceId >= 0) {