-
Notifications
You must be signed in to change notification settings - Fork 56
Spawn Boxes
A technical block that gives a structure dedicated spawning areas.
Vanilla's spawn_overrides apply to the whole structure bounding box, and there's only one pool per
structure. A spawn box spawns mobs only inside the box, and a structure can have several boxes
with different names and different pools. Useful when you want enemies in the hold of a ship but not
on the deck.
Place the Spawn Box Block in a jigsaw structure piece (or in your own structure that implements
ISpawnBoxStructure), then give it a name and a size in its screen. The block itself
disappears at worldgen time like a jigsaw block does.
Then add a spawn_boxes entry to the structure json. The name has to match the one you set on the
block:
{
"spawn_boxes": [
{
"category": "monster",
"name": "galleon_enemies",
"spawns": [
{
"type": "minecraft:pillager",
"weight": 4,
"minCount": 1,
"maxCount": 4
},
{
"type": "supplementaries:plunderer",
"weight": 7,
"minCount": 1,
"maxCount": 3
}
]
}
]
}spawn_boxes is a list. Each entry:
| Field | Type | Default | Description |
|---|---|---|---|
category |
mob category | required |
monster, creature, ambient, water_creature, ... |
name |
string | required | Must match the name set on the block. Several boxes can share a name to form one area |
spawns |
weighted list | required | Same format as vanilla spawn_overrides and biome spawners |
Each spawns entry is a vanilla SpawnerData: type, weight, minCount, maxCount.
You can have as many entries as you want, with different names and categories, and they stay independent of each other.
Basics Platform Helpers Registration Networking Events Configs Config Screen
Resources Runtime Resource Packs Texture Manipulation Resource Helpers Block Set API
Client Custom Models Item Rendering Rendered Textures Post Shaders GUI Toolkit Colors
World Block and Item Interfaces Additional Item Placements Improved Entities Fake Levels World Data Dispenser Behaviors
Utilities Codec Utilities Misc Helpers Commands
Datapacks Villagers Soft Fluids Map Markers Spawn Boxes Global Datapack Folder