Structure Spawn Loader
This mod provides the ability for datapacks and other modifications to use JSON files to add mob spawning to creature generation lists for various structures.
Basic Operating Principle
When a structure contains at least one mob spawn entry (added by the game itself, another mod, or through this utility), then within the bounds of that structure for the corresponding creature category (monsters, animals, ambient, etc.), the structure's spawn list will be used instead of the biome's standard spawn list.
JSON File Format
JSON files with spawn settings should be located at the path: data/namespace/structure_spawn_loader/path.json
Each file must contain two mandatory fields:
"structure"- structure type identifier"spawner"- object with spawn parameters
Files missing these fields will be ignored, allowing to disable entries from other mods or datapacks by overriding them with an empty object {}.

Spawner Parameters
In the "spawner" object, the following settings are available:
"type"- creature type identifier for spawning"weight"- relative weight of this entry compared to others (common monsters have a weight of 100)"minCount"and"maxCount"- determine the size of the spawning creature group (most mobs use 4-4, endermen 1-4, witches and zombie villagers 1-1)
Naming Recommendations
For convenience, the following naming scheme is recommended:
namespace- mod or datapack identifierpath-structuremod/structure/entitymod/entityfor adding creatureentitymod:entityto structurestructuremod:structure
Usage Example
File: data/examplemod/structure_spawn_loader/minecraft/village/minecraft/evoker.json
Developer Support
Mod developers can use this library through Cursemaven in their development environment. A data provider for generating spawn JSON files is also provided.