minecraft:connection_rule
Defines whether other blocks such as fences, walls, bars, and glass panes are allowed to connect to this block.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
accepts_connections_from | Textnone, only_fences, all | "all" | The type of block allowed to connect to this block. Note that the "only_fences" option allows connections from all Vanilla fences excluding NetherBrick. |
enabled_directions | List of text | ["south", "north", "east", "west"] | The cardinal directions that connection is enabled for. Note that if "none" is specified for "accepts_connections_from", this field will not be used. |
Example from the game files
This is how vanilla red_shrub uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:connection_rule": {
"accepts_connections_from": "none"
}
}Used by 2
Vanilla blocks with minecraft:connection_rule in their definition:
red_shrubshelf_mushroom