A library that places structures for mods built on it, on new terrain only, so they do not overlap each other, vanilla structures, or structures from the supported mods below. It adds no structures of its own and changes nothing on its own. Install it when a mod you use requires it.
AI usage disclaimer: This mod was developed with AI-agent assistance using this agent workflow. The project owner reviewed the work during development.
What it does
- No overlaps between library structures. Every structure placed through the library keeps its space and a gap of empty columns from the others, 32 by default and set by each mod.
- Keeps clear of vanilla structures. Library structures stay away from villages, desert and jungle temples, igloos, witch huts, mineshafts, strongholds, ocean monuments and woodland mansions. Small features such as dungeons and fossils are not avoided.
- Only new terrain. Structures appear only in chunks generated while the library is installed. Older chunks are never changed, so in an existing world they appear in areas not generated yet.
- Entrances stay open. Other library structures never build into a structure's entrance path. The path is checked again when the structure is finished; if something blocks it, the structure stays but its mod does not add loot or other contents, and an operator can retry it.
- Ground fit. Structures sit on the ground with foundations filled in under them. Spots that are too uneven, or covered by water when the structure does not allow it, are skipped.
Supported structure mods
These mods' structures and library structures are kept apart. If a library structure was decided first, the other mod's structure there is cancelled before it builds. If the other mod's structure was decided first, library structures keep away from it. Tested with these versions:
- Additional Structures 2.5.0, shown in the game as Rex's Additional Structures
- Ancient Warfare 2: Tweaked 2.9.20, structures and towns
- Castle Dungeons 2.2p1
- Chocolate Quest Repoured 2.8.0B
- Doomlike Dungeons 1.14.17
- Dungeons2 2.1.0
- Ice and Fire: RotN Edition 2.1.0: many dragon dens and myrmex hives near library structures are cancelled, and its structure locator can still point at one that was cancelled
- Recurrent Complex 1.4.8.7: its static and child structures cannot be cancelled; when one hits a library structure, the server log reports it
Other versions of these mods, and other files of the listed versions, are not tested. At startup, each integration checks that it still fits the installed version's code. If it fits, it is used, and the server log warns that this version was not tested; it can then act differently than with the tested version. If it does not fit, that integration turns off with a warning in the log, and that mod runs as usual but is not coordinated, so its structures can overlap library structures.
Structures these mods built before the library was installed, or while its integration was off, are not known to it. The library keeps only its own structures apart; it does not stop two of these mods, or one of them and a vanilla structure, from overlapping. Each mod's known limits are in the README and in /structureabstractions adapters.
Other structure mods are not coordinated, and their structures can overlap library structures. When one changes a finished library structure, the server log reports it.
For pack authors
- Install: on the server, and in the client for single player. Players can join a server without it, though a mod that uses it may need its own client install.
- Settings:
config/structureabstractions.cfgturns each supported mod's integration on or off, and the log reports of other mods changing a library structure. The integrations and reports are on by default. Changes need a restart. Every setting is listed in the README. - Commands:
/structureabstractions, or/sawhen no other mod uses that name, for operators.adaptersshows each supported mod's state and known limits,statsshows what was placed and why spots were refused,locateandinspectfind and describe placed structures, andsuspendedandresolvelist blocked structures and free or retry them. - Runtime: tested on Cleanroom, which includes MixinBooter. On standard Forge (not tested), the integrations other than Recurrent Complex need MixinBooter; without it they stay off and the rest of the library works.
- Memory: with library structures, Ancient Warfare 2: Tweaked can generate much more terrain. In one test, a 2 GB server ran out of memory where a 4 GB server ran.
For mod developers
Register a structure type with a template, a chance, biome and dimension rules, spacing and an optional occurrence limit. Structures can be up to 16 by 16 columns, on the ground surface of dimensions with sky light. The library finds a spot, checks it, builds the structure and calls your mod once for each marker, a named position such as a loot chest spot, when the structure is complete. The API, the template sidecar format and an example are in the README.
Source and issues: GitHub