What the library does
Formations is a backend library by SuperMartijn642 designed for structure datapack creators. If you build custom world generation datapacks, the mod adds extra structure handling features to your project. It works entirely on the server side, meaning clients do not need to install it to join a server running it. You can also include it in any custom modpack without asking for special permission.
Structure types and placement rules
The mod introduces two structure types named formations:simple and formations:pieced. Real talk, these align with vanilla regular and jigsaw structure types. They give you extra placement targets and a cleaner json layout.
You can position structures across nine placement modes:
- surface, which targets the top layer of solid blocks.
- ceiling, which attaches to the bottom layer of solid blocks.
- on_water, which finds the top block layer when it consists of water.
- on_lava, which targets top lava surfaces.
- underground, which puts the structure anywhere between the top and bottom block layers.
- underground_surface, which settles at the floor of an open underground space.
- underground_ceiling, which anchors to the roof of an open underground space.
- underground_buried, which stays sealed inside solid blocks without exposing open air.
- underground_on_lava, which rests on lava pools within open underground cavities.
For jigsaw pools, the mod adds formations:single_pool_element. Vanilla pools fix the base ground level to zero. This element lets you define a custom ground level with the ground_level key.
Custom structure processors
Formations includes eight structure processors that modify blocks during generation.
The formations:block_age processor swaps regular blocks for mossy or cracked variants, substitutes full blocks with slabs or stairs, or removes blocks as air using mossiness, degradation, and disintegration parameters. The formations:biome_replacements processor swaps materials like wood, bricks, and grass to match the local biome.
Other processors manage containers, plants, and utilities:
- formations:random_bed_color randomizes the color of placed beds.
- formations:random_plant_growth randomizes crop growth stages between minGrowth and maxGrowth limits.
- formations:respawn_anchor_charges sets respawn anchor charge values using minCharges and maxCharges.
- formations:fill_brewing_stands adds random potions and blaze powder using slotFillChance and maxBlazePowder settings.
- formations:fill_chiseled_bookshelves places enchanted books into bookshelves using a slotFillChance value.
- formations:waterlogging handles whether waterloggable blocks spawn filled with water.
Loader and environment support
Formations runs on Neoforge, Fabric, Quilt, and Forge. The project supports Minecraft versions 26.3, 26.2, 26.1.2, 26.1.1, and 26.1. It is marked as required on the server side and unsupported on the client side. If you want to see working setups, the author points to Formations Overworld and Formations Nether as example packs.
