概览
minecraft:tick_world 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让实体周围的区块保持加载和运行,即使附近没有玩家。请谨慎使用,因为会影响性能。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
radius | integer | 2 | 实体周围保持活跃的区块数。范围:2 到 6 |
distance_to_players | number | 128 | 玩家必须在多近以内实体才会保留;更远时它可能消失。never_despawn 为 true 时忽略此项。范围:128 到 … |
never_despawn | boolean | true | 为 true 时,无论玩家多远,实体都会留在世界中。 |
示例
写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):
BP/entities/<name>.json
{
"minecraft:tick_world": {
"radius": 2,
"distance_to_players": 128,
"never_despawn": true
}
}