Skip to main content

Spawn Component

Spawn components define how mobs are spawned during a raid — what entities to spawn, how many, and whether to spawn instantly or continuously.

Spawn component JSON files are stored under data/<mod_id>/htlib/spawn/.

.
├── data
│ └── mod_id
│ └── htlib
│ ├── raid ← Raid definitions
│ ├── wave ← Wave definitions
│ ├── spawn ← Mob spawning
│ ├── position ← Spawn positions
│ ├── result ← Results/rewards
│ └── raid_item ← Raid summoning items

Type Overview​

TypeDescription
htlib:onceInstant Spawn: spawns a specified number of mobs at once at a given tick
htlib:durationContinuous Spawn: spawns mobs at fixed intervals over a duration

Spawn Settings​

Common settings shared by both spawn types:

FieldTypeDefaultDescription
entity_typeString—Entity type of the raider, e.g. minecraft:zombie
nbtNBTEmptyNBT data appended to the spawned entity
enable_default_spawnBooleantrueWhether to enable vanilla built-in spawn effects
spawn_placementStringEmptySpawn position for this group, referencing a placement component. Highest priority
glowing_tickint0Entity glowing ticks, set to 0 if not glow

Tip: spawn_placement priority: spawn level > wave level > raid level.

Example: Custom Entity with NBT​

{
"type": "htlib:once",
"setting": {
"entity_type": "minecraft:zombie",
"nbt": {
"ArmorItems": [
{ "Count": 1, "id": "minecraft:diamond_boots", "tag": { "Damage": 0 } },
{ "Count": 1, "id": "minecraft:diamond_leggings", "tag": { "Damage": 0 } },
{ "Count": 1, "id": "minecraft:diamond_chestplate", "tag": { "Damage": 0 } },
{ "Count": 1, "id": "minecraft:diamond_helmet", "tag": { "Damage": 0 } }
]
}
},
"spawn_count": {
"type": "minecraft:uniform",
"value": {
"min_inclusive": 3,
"max_inclusive": 6
}
}
}

This example spawns 3–6 zombies wearing full diamond armor at the specified tick.

Chapter Navigation​