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

minecraft:selection_box

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

概览

minecraft:selection_box 是一个方块组件:写在自定义方块的 components 对象中。 设置玩家可以指向和点击的方块部分,也就是显示轮廓线的范围。设为 false 后方块完全无法被选中。

字段

字段类型默认值说明
originvec3[-8,0,-8]选择框起始角的位置,以像素为单位(一个方块 16 像素),从方块底面中心开始计算。
sizevec3[16,16,16]选择框的宽、高、深(像素)。[16, 16, 16] 是一个完整方块。

示例

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

BP/blocks/<name>.json
{
  "minecraft:selection_box": {
    "origin": [
      -8,
      0,
      -8
    ],
    "size": [
      16,
      16,
      16
    ]
  }
}

方块: 行为包

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