Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-11-08 17:40:04 +01:00
1.21: Apply components when placing block entities
Dieser Commit ist enthalten in:
Ursprung
ba042757fd
Commit
bacb8f1ecd
@ -358,6 +358,11 @@ public class SetBlockPacketListener implements PluginMessageListener {
|
||||
|
||||
BlockItem.updateCustomBlockEntityTag(player.level(), player, clickedPos, inHand);
|
||||
|
||||
BlockEntity blockEntity = player.level().getBlockEntity(clickedPos);
|
||||
if (blockEntity != null) {
|
||||
blockEntity.applyComponentsFromItemStack(inHand);
|
||||
}
|
||||
|
||||
if (!(actualBlock instanceof BedBlock) && !(actualBlock instanceof DoublePlantBlock) && !(actualBlock instanceof DoorBlock)) {
|
||||
actualBlock.setPlacedBy(player.level(), clickedPos, actualBlockState, player, inHand);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren