#How to flip a block upside down?
1 messages · Page 1 of 1 (latest)
you can use the minecraft:vertical_half state to check where the player has placed the block
then, use the minecraft:transformation component to flip it
"minecraft:block": {
"description": {
...
"traits": {
"minecraft:placement_position": {
"enabled_states": ["minecraft:vertical_half"]
}
}
},
"permutations": [
{
"condition": "q.block_state('minecraft:vertical_half') == 'top'",
"components": {
"minecraft:transformation": {
"rotation": [0, 0, 180]
}
}
}
]
}