概览
minecraft:random_offset 是一个方块组件:写在自定义方块的 components 对象中。 根据方块的位置让它稍微偏离中心,就像排列得不那么整齐的花和草。偏移会同时移动轮廓线和碰撞箱,并且始终保持在方块空间内。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
x | Range And Steps | {"range":{"max":0,"min":0},"steps":0} | 沿 x 轴的水平偏移:最小值和最大值范围,以及两者之间的步数。 |
y | Range And Steps | {"range":{"max":0,"min":0},"steps":0} | 上下偏移:最小值和最大值范围,以及两者之间的步数。 |
z | Range And Steps | {"range":{"max":0,"min":0},"steps":0} | 沿 z 轴的水平偏移:最小值和最大值范围,以及两者之间的步数。 |
示例
写在 BP/blocks/<name>.json 的 components 对象中(值为默认值或占位值):
BP/blocks/<name>.json
{
"minecraft:random_offset": {
"x": {
"range": {
"max": 0,
"min": 0
},
"steps": 0
},
"y": {
"range": {
"max": 0,
"min": 0
},
"steps": 0
},
"z": {
"range": {
"max": 0,
"min": 0
},
"steps": 0
}
}
}