跳转至

Despawn

文档版本:1.21.0.24

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_chanceboolean
Determines if min_range_random_chance is used in the standard despawn rules.
despawn_from_distanceobject
Defines the minimum and maximum distance for despawn to occur.
despawn_from_distance
max_distanceinteger
Maximum distance for standard despawn rules to instantly despawn the mob.
min_distanceinteger
Minimum distance for standard despawn rules to try to despawn the mob.
despawn_from_inactivityboolean
Determines if the min_range_inactivity_timer is used in the standard despawn rules.
despawn_from_simulation_edgeboolean
Determines if the mob is instantly despawned at the edge of simulation distance in the standard despawn rules.
filtersfilters
一个过滤器组。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_timerinteger
The amount of time in seconds that the mob must be inactive.
min_range_random_chanceinteger
A random chance between 1 and the given value.
remove_child_entitiesboolean
If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.