2021-10-08 12:59:03 +02:00
|
|
|
{
|
2021-10-08 13:04:13 +02:00
|
|
|
"$id": "blockception.minecraft.behavior.entities.minecraft.spawn_entity",
|
2021-10-08 12:59:03 +02:00
|
|
|
"type": "object",
|
|
|
|
|
"description": "Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).",
|
2021-10-08 13:04:13 +02:00
|
|
|
"title": "Spawn Entity",
|
2021-10-08 12:59:03 +02:00
|
|
|
"additionalProperties": false,
|
|
|
|
|
"definitions": {
|
|
|
|
|
"entity_spawn": {
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"type": "object",
|
|
|
|
|
"title": "Entity Spawn",
|
|
|
|
|
"properties": {
|
|
|
|
|
"filters": {
|
2022-07-22 19:41:04 +02:00
|
|
|
"description": "If present, the specified entity will only spawn if the filter evaluates to true.",
|
2021-10-08 12:59:03 +02:00
|
|
|
"$ref": "../../filters/filters.json"
|
|
|
|
|
},
|
|
|
|
|
"max_wait_time": {
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"default": 600,
|
|
|
|
|
"description": "Maximum amount of time to randomly wait in seconds before another entity is spawned.",
|
|
|
|
|
"title": "Maximum Wait Time"
|
|
|
|
|
},
|
|
|
|
|
"min_wait_time": {
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"default": 300,
|
|
|
|
|
"description": "Minimum amount of time to randomly wait in seconds before another entity is spawned.",
|
|
|
|
|
"title": "Minimum Wait Time"
|
|
|
|
|
},
|
|
|
|
|
"num_to_spawn": {
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"default": 1,
|
|
|
|
|
"description": "The number of entities of this type to spawn each time that this triggers.",
|
|
|
|
|
"title": "Num To Spawn"
|
|
|
|
|
},
|
|
|
|
|
"should_leash": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "If true, this the spawned entity will be leashed to the parent.",
|
|
|
|
|
"title": "Should Leash"
|
|
|
|
|
},
|
|
|
|
|
"single_use": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "If true, this component will only ever spawn the specified entity once.",
|
|
|
|
|
"title": "Single Use"
|
|
|
|
|
},
|
|
|
|
|
"spawn_entity": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"default": "",
|
|
|
|
|
"description": "Identifier of the entity to spawn, leave empty to spawn the item defined above instead.",
|
|
|
|
|
"title": "Spawn Entity"
|
|
|
|
|
},
|
|
|
|
|
"spawn_event": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"default": "minecraft:entity_born",
|
|
|
|
|
"description": "Event to call when the entity is spawned.",
|
|
|
|
|
"title": "Spawn Event"
|
|
|
|
|
},
|
2021-10-11 18:10:42 +02:00
|
|
|
"spawn_item": {
|
2022-10-06 13:03:40 +02:00
|
|
|
"$ref": "../../../../general/item/descriptor.json",
|
2021-10-11 18:10:42 +02:00
|
|
|
"default": "egg",
|
|
|
|
|
"description": "Item identifier of the item to spawn.",
|
|
|
|
|
"title": "Spawn Item"
|
|
|
|
|
},
|
|
|
|
|
"spawn_method": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"default": "born",
|
|
|
|
|
"description": "Method to use to spawn the entity.",
|
|
|
|
|
"title": "Spawn Method"
|
|
|
|
|
},
|
2021-10-08 12:59:03 +02:00
|
|
|
"spawn_sound": {
|
2022-10-02 21:51:03 +02:00
|
|
|
"$ref": "../../../../general/sound_event.json",
|
2021-10-08 12:59:03 +02:00
|
|
|
"default": "plop",
|
|
|
|
|
"description": "Identifier of the sound effect to play when the entity is spawned.",
|
|
|
|
|
"title": "Spawn Sound"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"entities": {
|
|
|
|
|
"title": "Entities",
|
2022-07-22 19:41:04 +02:00
|
|
|
"description": "The entities to spawn.",
|
2021-10-08 12:59:03 +02:00
|
|
|
"oneOf": [
|
2021-10-11 18:10:42 +02:00
|
|
|
{
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/entity_spawn"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
2021-10-14 23:09:07 +02:00
|
|
|
"type": "object",
|
2021-10-11 18:10:42 +02:00
|
|
|
"$ref": "#/definitions/entity_spawn"
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-08 12:59:03 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|