Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Creators
Details
Async Structure Generator (Astruct)
Astruct lets you generate massive jigsaw-based structures without freezing the server. It plans structures off-thread, queues placements, and only builds blocks once the required chunks are loaded.
In practice, very large structures may āstream inā over a few secondsāespecially after teleportingāsince planning can take time. In survival, this is usually unnoticeable when
plan_horizon_chunksis set high enough.
Why use Astruct?
- Way beyond vanilla limits ā plan thousands of jigsaw pieces safely.
- Off-thread planning ā heavy jigsaw expansion runs outside the main thread, avoiding TPS spikes.
- Datapack-driven ā ship content via JSON; no code required.
How it works (short version)
- Centers ā The world is partitioned into ācellsā (
spacing). Each cell gets a deterministic, seed-based center per structure ID. - Proximity scan ā As players roam, Astruct pre-plans cells well ahead of them.
- Async expansion ā Jigsaw expansion runs off-thread.
- Placement queue ā Finished plans enqueue pieces, keyed by the chunks they need.
- Chunk-safe build ā On chunk load (and periodic sweeps), Astruct places only pieces whose chunks are currently loaded.
JSON definition (datapack)
Place JSON files at:
data/<namespace>/worldgen/async_structure/<id>.json
Example
{
"id": "example:castle",
"dimension": "minecraft:the_nether",
"start_pool": "castle:start",
"fallback_pool": "castle:caps",
"soft_radius_chunks": 16,
"plan_horizon_chunks": 160,
"budgets": {
"max_steps": 30,
"max_open_connectors": 128
},
"gen_y": { "mode": "surface", "value": 0 },
"spacing": 2048
}
Field reference
-
id
Unique structure ID (should match the file path key). -
dimension
Target dimension key (e.g.minecraft:the_nether). -
start_pool
Template pool to start expansion from. -
fallback_pool
Pool used to cap dead-ends (end pieces). -
soft_radius_chunks
Max distance budget (in chunks) from the center during expansion. -
plan_horizon_chunks
How far ahead (in chunks) the planner prepares around players. -
budgets.max_steps
Upper bound on jigsaw pieces per plan. -
budgets.max_open_connectors
Safety limit for outstanding connectors. -
gen_y
Controls how the final Y coordinate is chosen.
Y is resolved late, at the final structure position.Supported modes:
-
"fixed"
Always usevalueas the Y level. -
"min_plus"
min_build_height + value. -
"world_y"
World sea level. -
"surface"
Terrain surface at the structureās X/Z position
(plus optional offset viavalue).
Example:
"gen_y": { "mode": "surface", "value": 0 } -
-
spacing
Cell size in blocks (effective density control).
Field reference
idā Unique structure ID (should match the file path key).dimensionā Target dimension key (e.g.minecraft:the_nether).start_poolā Template pool to start expansion from.fallback_poolā Pool used to cap dead-ends (end pieces).soft_radius_chunksā Max distance budget (in chunks) from the center during expansion.plan_horizon_chunksā How far ahead (in chunks) the planner prepares around players.budgets.max_stepsā Upper bound on jigsaw pieces per plan.budgets.max_open_connectorsā Safety limit for outstanding connectors.gen_y.modeā"fixed" | "world_y" | "min_plus".gen_y.valueā Y or offset (depending on mode).spacingā Cell size in blocks (effective density control).piece_rules.deny_overlap_tile_entitiesā Optional safety flag to skip pieces that would overlap TEs.
Commands
Astruct plugs into the vanilla /locate root:
/locate astructā Nearest center for any Astruct structure in this dimension./locate astruct <id>ā Nearest center for a specific structure ID.
Config (server)
astruct-common.toml:
debug_logs(bool, defaultfalse) ā Verbose diagnostics.max_placements_per_tick(int, default10) ā Upper bound on pieces placed each tick. Tune for your hardware/pack.
Performance notes
- Planning cost scales with
max_stepsand pool complexity. Thousands of pieces may take seconds off-threadāthatās expected. Players wonāt lag; placement is paced. - Placement is chunk-paced. Pieces place only when their chunks are loaded, producing a smooth āstreamingā effect as you approach.
Compatibility
- Works alongside vanilla and modded structures. Astruct doesnāt replace vanilla generation; it adds an async planner/placer on top.
Troubleshooting
- āUnknown structure idā in commands
Check your datapack path and that
idinside JSON matches the fileās namespaced key. - āMy structure never generatesā / āIt takes agesā
Enable
debug_logsto see planning times. Very highmax_stepsor complex pools can take long. Reducemax_steps, increaseplan_horizon_chunks, or increasespacing. - Spammy logs
Set
debug_logs = false(default).
Roadmap
- Per-structure placement throttles.
- In-game visualization for planned cells.
- Integration under
/locate structure.



