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

minecraft:transformation

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

概览

minecraft:transformation 是一个方块组件:写在自定义方块的 components 对象中。 以方块空间的中心为基准,移动、旋转或缩放方块的外观。配合方块状态使用,可以让方块朝向不同方向。

字段

字段类型默认值说明
translationvec3[0,0,0]方块在 x、y、z 上移动的距离。
scalevec3[1,1,1]方块在每个轴上拉伸或缩小的程度。1 为正常大小。
scale_pivotvec3[0,0,0]方块缩放时围绕的点。
rotationvec3[0,0,0]每个轴上的旋转,以 90 度为一步,比如 [0, 90, 0]。
rotation_pivotvec3[0,0,0]方块旋转时围绕的点。

示例

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

BP/blocks/<name>.json
{
  "minecraft:transformation": {
    "translation": [
      0,
      0,
      0
    ],
    "scale": [
      1,
      1,
      1
    ],
    "scale_pivot": [
      0,
      0,
      0
    ],
    "rotation": [
      0,
      0,
      0
    ],
    "rotation_pivot": [
      0,
      0,
      0
    ]
  }
}

方块: 行为包

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