Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-09-29 16:00:04 +02: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);
|
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)) {
|
if (!(actualBlock instanceof BedBlock) && !(actualBlock instanceof DoublePlantBlock) && !(actualBlock instanceof DoorBlock)) {
|
||||||
actualBlock.setPlacedBy(player.level(), clickedPos, actualBlockState, player, inHand);
|
actualBlock.setPlacedBy(player.level(), clickedPos, actualBlockState, player, inHand);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren