Spawn Entity¶
文档版本:1.21.50.25
Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).
架构¶
spawn_entity:
{
object "entities" : opt
{
filters "filters"
integer "max_wait_time" : opt
integer "min_wait_time" : opt
integer "num_to_spawn" : opt
boolean "should_leash" : opt
boolean "single_use" : opt
string "spawn_entity" : opt
string "spawn_event" : opt
descriptor "spawn_item"
string "spawn_method" : opt
sound_event "spawn_sound"
event_object "spawn_item_event"
}
array "entities" : opt
{
object "<any array element>" : opt
{
}
}
}
entities
:object- The entities to spawn.
entities
filters
:filters- 一个过滤器组。If present, the specified entity will only spawn if the filter evaluates to true.
max_wait_time
:integer- Maximum amount of time to randomly wait in seconds before another entity is spawned.
min_wait_time
:integer- Minimum amount of time to randomly wait in seconds before another entity is spawned.
num_to_spawn
:integer- The number of entities of this type to spawn each time that this triggers.
should_leash
:boolean- If true, this the spawned entity will be leashed to the parent.
single_use
:boolean- If true, this component will only ever spawn the specified entity once.
spawn_entity
:string- Identifier of the entity to spawn, leave empty to spawn the item defined above instead.
spawn_event
:string- Event to call when the entity is spawned.
spawn_item
:descriptor- Item identifier of the item to spawn.
item
:identifier
item
:object- An object that describes an item.
item
tags
:0- [UNDOCUMENTED] A Molang expression ran against item or block to match.
item_tag
:string- [UNDOCUMENTED] A tag to lookup item or block by.
descriptor:
{
identifier "item"
object "item" : opt
{
identifier "item"
object "item" : opt
{
}
0 "tags"
string "item_tag" : opt
}
}
spawn_method
:string- Method to use to spawn the entity.
spawn_sound
:sound_event- Identifier of the sound effect to play when the entity is spawned.
spawn_item_event
:event_object- Event to call on this entity when the item is spawned.
entities
:array- The entities to spawn.
entities
<any array element>
:object
<any array element>