Sparse Structures

by Maxence11.0M downloadsForge

One mixin mod that makes all structures (including non-vanilla ones) more spread out (essentially making them rarer). Useful for big modpacks with lots of structure mods to make exploration more challenging/less repetitive.

Mods1.21.xWorld GenServer UtilityUtility & QoLStructuresCurseForgeSource

Sparse Structures Mod Guide: Control Structure Rarity & Spacing

Sparse Structures gives you full control over how frequently structures generate in your Minecraft world. With a single config file, you can make Villages, Temples, and modded structures twice as rare, completely disable specific ones, or even make them more common. Essential for modpacks where dozens of structure mods make exploration feel cluttered.

Overview

Sparse Structures is a lightweight utility mod that adjusts how far apart all structures spawn in your world. By default, it doubles the spacing and separation values for every Structure Set in the game, making Villages, Temples, Strongholds, and all modded structures roughly twice as rare. This applies to vanilla structures, modded structures, and even datapack structures automatically.

The mod works through Minecraft's mixin system, intercepting structure placement data during world generation and multiplying spacing values by a configurable factor. It does not add any items, blocks, or crafting recipes. Instead, it provides a single configuration file where you control exactly how rare or common each structure should be. If you're running a modpack with dozens of structure mods and finding a new Village every hundred blocks, this is the mod that fixes that problem.

Beyond basic rarity control, Sparse Structures also fixes the vanilla bug MC-177381 (where the /locate command reports incorrect distances), removes the 4096-chunk separation limit that vanilla imposes, and generates unique salts per structure to prevent clustering. You can browse detailed configuration options throughout this guide.

Getting Started

  1. 1

    Install and Launch Once

    Install Sparse Structures into your mods folder (Forge, Fabric, or NeoForge). Launch the game once and load into a world. The mod will automatically generate its config file at config/sparsestructures.json5 with sensible defaults. All structures are already twice as rare with no further action needed.

  2. 2

    Understand the Default Settings

    Out of the box, the global spreadFactor is set to 2 and idBasedSalt is enabled. This means every structure's spacing and separation values are multiplied by 2, and each structure gets a unique salt derived from its ID to prevent overlapping. The Woodland Mansion is also given an additional custom factor of 2, making it four times rarer than vanilla (2x global multiplied by 2x custom).

  3. 3

    Dump Your Structure Sets

    In-game, run the command /dumpstructuresets (requires operator permissions). This creates a text file in the sparsestructures/ folder with every registered Structure Set listed in the exact format needed for the config file. This is the easiest way to find the correct namespace and ID for any structure you want to customize.

  4. 4

    Customize Individual Structures

    Open sparsestructures.json5 in any text editor. To change a specific structure's rarity, add an entry to the customSpreadFactors array with the structure's ID and your desired factor. For example, setting a factor of 0.5 on Villages makes them spawn at half their normal spacing (more common), while a factor of 0 disables a structure entirely.

  5. 5

    Restart to Apply Changes

    After editing the config, you must fully restart the game for changes to take effect. The mod reads its configuration during initialization and applies spacing modifications as structures are loaded. A simple world rejoin is not enough; you need a complete game restart. Changes only affect newly generated chunks, so existing terrain keeps its original structures.

No New Items or Blocks

Sparse Structures does not add any items, blocks, mobs, or recipes to the game. It is purely a world generation modifier. The Items and Recipes tabs on this page will be empty.

Configuration

All configuration lives in a single file: config/sparsestructures.json5. The file uses the JSON5 format, which supports comments. There are three settings that control how the mod behaves.

spreadFactor (Global Rarity)

The spreadFactor is a multiplier applied to every structure's spacing and separation values. The default value is 2, meaning structures spawn with twice the distance between them. A value of 1 leaves structures at their vanilla or modded defaults. Values below 1 (like 0.5) make structures more common. A value of 0 disables all structures entirely. Decimal values are supported, so 1.5 would make structures 50% rarer.

The mod multiplies both the spacing (maximum distance between structures) and separation (minimum distance between structures) by this factor. If the calculated separation ends up equal to or greater than spacing, the mod automatically corrects it by setting separation to spacing minus 1, ensuring valid generation parameters.

Very Low Spread Factors Cause Lag

Setting the spreadFactor to a very low value like 0.01 makes structures extremely common and will significantly slow down world generation. This can cause noticeable lag when exploring new chunks. Values below 0.5 should be used with caution.

idBasedSalt (Anti-Clustering)

When idBasedSalt is set to true (the default), the mod generates a unique salt value for each Structure Set based on a hash of its ID. The salt is calculated as the absolute value of the structure ID's hash code modulo Integer.MAX_VALUE. This is important because many modded structures leave their salt at 0 or use the same default value, which causes different structures to cluster together in the same chunks. With unique salts, each structure type gets its own independent placement grid, spreading them out much more evenly across the world.

customSpreadFactors (Per-Structure Control)

The customSpreadFactors array lets you override the global spreadFactor for specific structures. Each entry needs a structure field (the namespaced ID) and a factor field (the multiplier). You can target either a Structure Set ID (like "minecraft:villages") or an individual structure name (like "minecraft:village_plains"). When you target an individual structure, all structures within that same set are affected.

The custom factor completely replaces the global factor for that structure, it does not stack on top of it. If your global spreadFactor is 2 and you set a custom factor of 3 for Villages, Villages will be 3x rarer (not 6x). Setting a custom factor of 1 effectively exempts a structure from the global modifier. Setting it to 0 disables that structure entirely.

How It Works Under the Hood

Sparse Structures uses three mixins to modify Minecraft's world generation. Understanding what they do helps explain the mod's behavior and limitations.

Structure Spacing Modification

The core mixin intercepts Minecraft's registry data loader as it reads Structure Set JSON files. For every Structure Set that uses random spread placement (which is most structures), the mod multiplies the spacing and separation values by the appropriate spread factor. Structures using concentric ring placement (like Strongholds) are left untouched, since their placement system works fundamentally differently.

When a structure's spread factor is set to 0, instead of modifying spacing, the mod sets the structure's frequency to 0, effectively preventing it from ever generating.

Separation Limit Removal

Vanilla Minecraft caps the maximum separation between structures at 4096 chunks (65,536 blocks). The mod removes this cap by replacing the constant with Integer.MAX_VALUE (2,147,483,647). While most players will never need structures to be this rare, it ensures that extremely high spread factors work correctly without being silently clamped.

/locate Distance Fix

The mod fixes Minecraft bug MC-177381, which caused the /locate command to report incorrect distances between the player and located structures. The fix replaces vanilla's distance calculation with a proper Euclidean distance formula using Math.hypot(), giving you accurate distance readings when locating structures.

Spread Factor Quick Reference

Factor 0Structure is completely disabled
Factor 0.5Structures are 2x more common than default
Factor 1No change (vanilla/mod default spacing)
Factor 2Structures are 2x rarer (mod default)
Factor 5Structures are 5x rarer
Factor 10Structures are 10x rarer

Common Configuration Examples

Here are some practical config setups for different play styles and modpack scenarios.

Heavy Modpack (Lots of Structure Mods)

If you're running modpacks with mods like Explorify, YUNG's Better Structures, Towns and Towers, and Dungeons and Taverns all at once, a global spreadFactor of 2 or 3 prevents the world from feeling like an overcrowded theme park. Leave idBasedSalt enabled to prevent structures from different mods clustering in the same area. You can then set specific important structures (like Villages) to a custom factor of 1 to keep them at normal rarity since they provide essential Villager trading.

Hardcore / Survival Challenge

For a challenging survival experience where structures are genuinely rare and valuable to find, set the global spreadFactor to 5 or higher. Finding a Village becomes a significant event rather than a routine occurrence. Combine this with custom factors of 1 on Strongholds so End progression remains achievable, and consider leaving Nether Fortresses at a lower factor since they're required for Blaze Rods.

Selective Structure Disabling

Set the global spreadFactor to 1 so most structures remain normal, then use customSpreadFactors to disable specific structures by setting their factor to 0. This is useful when two structure mods add similar buildings and you want to keep only one, or when a particular structure causes performance issues or conflicts with your world's aesthetic.

Compatibility

Sparse Structures works with virtually all structure mods and datapacks because it operates at the registry level, modifying Structure Set data as it's loaded regardless of which mod registered it. This means mods like YUNG's Better Dungeons, Repurposed Structures, Towns and Towers, and any other structure mod are automatically affected without needing specific compatibility patches.

There is one notable exception: the mod is incompatible with Cyanide, which also modifies structure placement data. Structures using concentric ring placement (primarily Strongholds) are not affected by the mod, as their placement system is fundamentally different from random spread.

The mod does not alter ore generation, geode placement, or other non-structure world generation features. Terrain and tree generation are affected very slightly (due to how structure placement influences chunk generation order), but not enough to be noticeable in normal gameplay.

Alex's Caves Compatibility

If you're using the Alex's Caves mod, set all of its structures to a custom factor of 1 in your config. Alex's Caves structures have known issues when their spacing is modified by Sparse Structures. Leaving them at factor 1 exempts them from any changes.

Frequently Asked Questions

Do I need to create a new world for changes to take effect?

You need to restart the game, but you do not need a new world. Config changes apply to any chunks that haven't been generated yet. Already-explored areas keep their existing structures. If you want the full effect across your entire world, you would need a new world, but for ongoing exploration the changes apply immediately to new terrain.

Does this affect Strongholds?

No. Strongholds use concentric ring placement, which is a completely different system from random spread placement. The mod specifically skips any Structure Set using the "minecraft:concentric_rings" placement type. Stronghold generation remains identical to vanilla.

How do I find the correct structure ID for the config?

Run the /dumpstructuresets command in-game. It creates a timestamped text file in the sparsestructures/ folder of your game directory with every Structure Set listed in the exact format needed for the customSpreadFactors config. Simply copy the structure ID from there.

Why are structures still spawning close together even with a high spread factor?

Make sure you fully restarted the game after editing the config (not just rejoined the world). Also remember that changes only affect newly generated chunks. If you're exploring areas that were already generated, those structures were placed before your config change. Try exploring in a completely new direction to see fresh chunk generation with the updated settings.

Can I make specific structures more common while keeping others rare?

Yes. Set your global spreadFactor to whatever rarity you want as the baseline, then use customSpreadFactors to override individual structures. A custom factor below 1 (like 0.5) makes that specific structure more common than vanilla. A custom factor of 1 keeps it at default. This gives you complete per-structure control.

Does the mod affect ore generation or biome placement?

No. Sparse Structures only modifies Structure Set placement data. Ore veins, Geodes, biome distribution, terrain shape, and other world generation features are completely unaffected. There may be extremely subtle terrain differences due to how structure placement influences chunk generation order, but nothing noticeable in normal gameplay.

Draft preview — this guide has not been reviewed or published yet.