minecraft:spawn_entity for you with a switch.Get GodCraftOverview
minecraft:spawn_entity is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the entity drop an item or spawn another entity every so often, like a chicken laying eggs.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
filters | Minecraft Filter | none | Conditions that must be true for anything to spawn. |
max_wait_time | Integer | "600" | Longest wait in seconds before the next spawn. |
min_wait_time | Integer | "300" | Shortest wait in seconds before the next spawn. |
num_to_spawn | Integer | "1" | How many entities appear each time. |
should_leash | Boolean | "false" | If true, the new entity is leashed to this one. |
single_use | Boolean | "false" | If true, it only spawns once and never again. |
spawn_entity | String | none | Entity to spawn; leave it empty to drop spawn_item instead. |
spawn_event | String | "minecraft:entity_born" | Event to run on the newly spawned entity. |
spawn_item | String | "egg" | Item to drop, such as minecraft:egg. |
spawn_item_event | Trigger | none | Event to run on this entity when the item drops. |
spawn_method | String | "born" | How the new entity is created, such as born or spawned. |
spawn_sound | String | "plop" | Sound played when something spawns. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:spawn_entity": {
"filters": {},
"max_wait_time": "600",
"min_wait_time": "300",
"num_to_spawn": "1",
"should_leash": "false",
"single_use": "false",
"spawn_entity": "",
"spawn_event": "minecraft:entity_born"
}
}