Despawn¶
文档版本:1.21.50.25
Despawns the Actor when the despawn rules or optional filters evaluate to true.
架构¶
despawn:
{
boolean "despawn_from_chance" : opt
object "despawn_from_distance" : opt
{
integer "max_distance" : opt
integer "min_distance" : opt
}
boolean "despawn_from_inactivity" : opt
boolean "despawn_from_simulation_edge" : opt
filters "filters"
integer "min_range_inactivity_timer" : opt
integer "min_range_random_chance" : opt
boolean "remove_child_entities" : opt
}
despawn_from_chance:boolean- Determines if
min_range_random_chanceis used in the standard despawn rules.
despawn_from_distance:object- Defines the minimum and maximum distance for despawn to occur.
despawn_from_distancemax_distance:integer- Maximum distance for standard despawn rules to instantly despawn the mob.
min_distance:integer- Minimum distance for standard despawn rules to try to despawn the mob.
despawn_from_inactivity:boolean- Determines if the
min_range_inactivity_timeris used in the standard despawn rules.
despawn_from_simulation_edge:boolean- Determines if the mob is instantly despawned at the edge of simulation distance in the standard despawn rules.
filters:filters- 一个过滤器组。The list of conditions that must be satisfied before the Actor is despawned. If a filter is defined then standard despawn rules are ignored.
min_range_inactivity_timer:integer- The amount of time in seconds that the mob must be inactive.
min_range_random_chance:integer- A random chance between 1 and the given value.
remove_child_entities:boolean- If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.