minecraft:placement_filter for you with a switch.Get GodCraftOverview
minecraft:placement_filter is a block component: it goes in the components object of a custom block. Limits where the block can be placed and makes it break if its support goes away, like a flower that needs dirt below it.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
conditions | Placement Condition[] | none | List of rules: which faces it may attach to and which blocks it may sit on. Meeting any one rule is enough. |
Example
Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):
BP/blocks/<name>.json
{
"minecraft:placement_filter": {
"conditions": []
}
}