1. Wiki
  2. /方块
  3. /minecraft:connection_rule

minecraft:connection_rule

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:connection_rule。Get GodCraft

概览

minecraft:connection_rule 是一个方块组件:写在自定义方块的 components 对象中。 控制栅栏、墙、铁栏杆和玻璃板放在这个方块旁边时是否会与它连接。

字段

字段类型默认值说明
accepts_connections_fromConnection Type"all"哪些方块可以连接:"all"、"only_fences" 或 "none"。下界砖栅栏不算在 "only_fences" 中。
enabled_directionsDirection[]["south","north","east","west"]允许连接的面(北、东、南、西)。不允许任何连接时会被忽略。

示例

写在 BP/blocks/<name>.json 的 components 对象中(值为默认值或占位值):

BP/blocks/<name>.json
{
  "minecraft:connection_rule": {
    "accepts_connections_from": "all",
    "enabled_directions": [
      "south",
      "north",
      "east",
      "west"
    ]
  }
}

方块: 行为包

We use cookies to improve your experience and analyse site traffic. Learn more