概览
minecraft:trail 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 实体移动时在身后留下方块,就像雪傀儡留下的雪迹。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
block_type | String | "air" | 沿路径放置的方块;固体方块需要设置偏移,免得把实体困住。 |
spawn_filter | Minecraft Filter | 无 | 放置方块必须满足的条件。 |
spawn_offset | Vector [a, b, c] | "[0, 0, 0]" | 方块相对于实体出现的位置,最远 16 格。X 为左右,Y 为下上,Z 为后前。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:trail": {
"block_type": "air",
"spawn_filter": {},
"spawn_offset": "[0, 0, 0]"
}
}