Adding worldgen features and structures
Add-on worldgen splits into two systems. A feature decides "what to place and how", a feature rule decides "where and how often", and the pair runs per chunk. Jigsaw is a system separate from features: it joins structure file pieces into large structures and generates before features. Every file goes in the behavior pack (BP). The terrain shape itself cannot be changed by an add-on.
When to use it
| Goal | Method in this guide | If it does not fit |
|---|---|---|
| Generate ores, plants or small decorations naturally | Feature + feature rule | - |
| Generate one structure of 16x16 or less naturally | structure_template_feature + feature rule | A feature is cut outside the 3x3 chunks (48x48) around its origin. Use jigsaw for larger ones |
Large structures, several pieces, /locate structure, entities inside the structure | Jigsaw (structure, template pool, structure set) | - |
| Change the frequency of a vanilla feature or structure, or turn it off | Override it with the same identifier as vanilla | Leaves, vines, glow lichen, mineshafts, caves and End structures cannot be removed |
| Change terrain height and shape | Biomes cannot do it. Change it with features that place air and stone | Terrain changes |
| Place only in a custom biome | Give the custom biome (minecraft:replace_biomes) a custom tag and filter on it in the feature rule | Custom biomes do not work in the End. Use a low-frequency q.noise zone |
| Place in a custom dimension | Feature rules and structure sets do not run naturally | Place with scripts (placeFeature, placeJigsawStructure) |
Minimal example
A behavior pack that adds one ore and one jigsaw structure. The feature rule and the jigsaw structure file are taken from the examples in worldgen section 1 and section 8; the ore feature follows the shape of the MS Learn minecraft:ore_feature example; the template pool and structure set are written from the field tables of the MS Learn jigsaw reference and the rules in Files and minimal setup. A pack with these files verbatim (the .mcstructure was a 5x4x5 oak plank hut generated as NBT) worked on Windows 1.26.65 {measured}: /place feature wiki:my_ore_feature placed 9 diamond blocks (with the x, z +8 offset, How to check step 3), /place structure wiki:hut placed the whole hut, and /locate structure wiki:hut found a naturally generated hut 705 blocks away. The name part of each identifier matches its file name (required for the feature rule, optional for the others).
my_worldgen_bp/
manifest.json
features/
my_ore_feature.json
feature_rules/
my_ore_feature_rule.json
structures/
wiki/
hut.mcstructure
worldgen/
structures/
hut.json
template_pools/
hut_start.json
structure_sets/
hut_set.json
manifest.json: one data module. Make the two UUIDs new for each pack.
{
"format_version": 3,
"header": {
"name": "My worldgen BP",
"description": "Adds an ore and a hut",
"uuid": "5b2f9d47-8c13-4e6a-a0d2-7e4c1b9f3a58",
"version": "1.0.0",
"min_engine_version": "1.26.40"
},
"modules": [
{ "type": "data", "uuid": "c81e4a06-3f75-4d29-9b6e-2a0f8d5c7e14", "version": "1.0.0" }
],
"metadata": { "authors": ["Example"] }
}
features/my_ore_feature.json: an ore vein that turns stone into diamond blocks. The block was chosen only because it is easy to see. may_replace is silently required (MCPE-242127).
{
"format_version": "1.13.0",
"minecraft:ore_feature": {
"description": {
"identifier": "wiki:my_ore_feature"
},
"count": 12,
"replace_rules": [
{
"places_block": "minecraft:diamond_block",
"may_replace": [ "minecraft:stone" ]
}
]
}
}
feature_rules/my_ore_feature_rule.json: the file name equals the name part of the identifier (MCPE-242144).
{
"format_version": "1.13.0",
"minecraft:feature_rules": {
"description": {
"identifier": "wiki:my_ore_feature_rule",
"places_feature": "wiki:my_ore_feature"
},
"conditions": {
"placement_pass": "underground_pass",
"minecraft:biome_filter": [ { "test": "has_biome_tag", "operator": "==", "value": "overworld" } ]
},
"distribution": {
"iterations": 8,
"coordinate_eval_order": "zyx",
"x": { "distribution": "uniform", "extent": [ 0, 16 ] },
"y": { "distribution": "uniform", "extent": [ -32, 64 ] },
"z": { "distribution": "uniform", "extent": [ 0, 16 ] }
}
}
}
structures/wiki/hut.mcstructure: build the hut in game and export it with a structure block on Windows. Its identifier becomes wiki:hut. Fill the empty cells with structure void instead of air (/give @s structure_void, /fill ~~~ ~~~ structure_void replace air) before saving, so the terrain shows through and trees do not overwrite it.
worldgen/structures/hut.json: a single-piece jigsaw with no jigsaw blocks. It generates only in plains biomes.
{
"format_version": "1.21.100",
"minecraft:jigsaw": {
"description": { "identifier": "wiki:hut" },
"biome_filters": [ { "test": "has_biome_tag", "operator": "==", "value": "plains" } ],
"step": "surface_structures",
"start_pool": "wiki:hut_start",
"max_depth": 4,
"start_height": { "type": "constant", "value": { "absolute": 0 } },
"heightmap_projection": "world_surface",
"terrain_adaptation": "beard_thin",
"max_distance_from_center": 80,
"dimension_padding": { "top": 10, "bottom": 10 }
}
}
worldgen/template_pools/hut_start.json: location is a path relative to structures/, not an identifier. projection goes inside element, weight outside.
{
"format_version": "1.21.100",
"minecraft:template_pool": {
"description": { "identifier": "wiki:hut_start" },
"elements": [
{
"element": {
"element_type": "minecraft:single_pool_element",
"location": "wiki/hut",
"projection": "rigid"
},
"weight": 1
}
]
}
}
worldgen/structure_sets/hut_set.json: needed for natural generation and for /place structure. separation is less than half of spacing. salt is an integer that differs per set.
{
"format_version": "1.21.100",
"minecraft:structure_set": {
"description": { "identifier": "wiki:hut_set" },
"placement": {
"type": "minecraft:random_spread",
"salt": 1234567,
"spread_type": "linear",
"separation": 8,
"spacing": 34
},
"structures": [
{ "structure": "wiki:hut", "weight": 1 }
]
}
}
Other forms
| Form | How to write it |
|---|---|
| One structure as a feature | Give minecraft:structure_template_feature a structure_name (wiki:hut), adjustment_radius (8 to 16), facing_direction (random allowed) and constraints (grounded, unburied, block_intersection.block_allowlist). The feature rule places it with surface_pass, scatter_chance, "y": "query.heightmap(variable.worldx, variable.worldz)" and a has_biome_tag filter. No entities are spawned |
| Ground decoration | places_block of a single_block_feature can take a block descriptor with states, { "name": "...", "states": { ... } }. The feature rule pass is after_surface_pass |
| Conditional branches | Add early_out to an aggregate_feature. sequence_feature has bugs. conditional_list became stable on 2026-09-15 |
| One coordinate only | Use Molang in the feature rule iterations: "math.floor(v.originx/16)==math.floor(100/16)&&math.floor(v.originz/16)==math.floor(100/16) ? 1 : 0" |
| Turn off a vanilla feature | Copy the vanilla feature rule with the same identifier into BP/feature_rules/ and set iterations to 0. The vanilla files are in data/definitions/ of the BDS zip |
| Vanilla structure frequency | Override the vanilla structure set with the same identifier and change separation and spacing |
| processor | Reference a minecraft:processor_list in worldgen/processors/ from a pool element with "processors": "ns:name". Types include minecraft:rule, minecraft:protected_blocks, minecraft:block_ignore and minecraft:capped |
Must match
- Features, feature rules, structures and jigsaw files all go in the BP. In the RP they fail silently.
- Folder names:
features/,feature_rules/,structures/,worldgen/structures/,worldgen/structure_sets/(plural),worldgen/template_pools/,worldgen/processors/.world_gen,worldgen/jigsaw_structuresand singularstructure_setdo not work. - The feature rule file name equals the name part of its identifier (MCPE-242144). When they differ, the Content Log shows
[FeatureRegistry] ... | not_matching | Feature rule identifier 'mismatch_rule' does not match filename 'not_matching'and entering the world shows "At least one of your resource or behavior packs failed to load."/place featurerulestill succeeded; whether such a rule generates naturally was not measured{measured}. - A feature file name may differ from the identifier.
wiki:odd_oreinfeatures/some_other_name.jsonloaded with no error and was placed with/place feature wiki:odd_ore{measured}. places_featureequals the feature identifier character for character. Pointing at a missing ID is an error.- A feature is registered only when at least one feature rule references it (MCPE-242142). A feature without a rule cannot be used even with
/place feature, which fails withSyntax error: Unexpected "wiki:rule_less_ore". To use it only with/placeand no natural placement, reference it from a rule withiterations0{measured}. - A missing
format_versiongivesno valid version passed; one that does not fit the feature type givesdescription missing places_feature. - Do not use the
minecraft:prefix on new features and rules. Use the vanilla identifier only to change vanilla. - The biome filter is
"test": "has_biome_tag".has_tagfails silently. Filter by tag, not by biome ID. Group several biomes withany_of. - The
placement_passorder ispregeneration_pass,first_pass,before_underground_pass,underground_pass,after_underground_pass,before_surface_pass,surface_pass,after_surface_pass,before_sky_pass,sky_pass,after_sky_pass,final_pass. Ores useunderground_pass, ground decorationafter_surface_pass, treesfirst_passorbefore_surface_pass. iterationsis a count per chunk and is rounded to an integer (0.4 is 0).scatter_chanceis a per-chunk probability, either a percentage (5 is 5%) or{ "numerator": 1, "denominator": 100 }.- The range covering a whole chunk is
[0, 16]foruniformand[0, 15]forfixed_grid. - One feature writes only from -16 to +32 (48x48) around its origin chunk. The rest is cut without an error. Keep structures at 16x16 or less and place them at x and z 8.
- When y uses
v.worldxorv.worldz, put y last incoordinate_eval_order. Call the height query asq.heightmap(v.worldx, v.worldz)(wrong arguments crashed world loading). q.noise()does not depend on the seed.q.get_level_seed_based_fractioncannot be used in features.- Leaving out
may_replaceinore_featurefails silently, and it does not accept block states or tag descriptors. - A structure file is
structures/<namespace>/<name>.mcstructureand its identifier isnamespace:name. Do not put spaces in the file name. - A template pool
locationis a path relative tostructures/, without the extension and without anamespace:prefix (for examplewiki/hut). - A pool element's
element_typeisminecraft:single_pool_element.legacy_single_pool_elementis not supported. Putprojectioninsideelement; outside it silently becomesrigid. - A structure set needs a numeric
spacing. Without it the structure is not in the/place structurelist.separationis less than half ofspacing. max_depthis at most 20,max_distance_from_centerat most 128.start_heighthas the form{ "type": "constant", "value": { "absolute": 0 } }.uniformusesminandmax, like"min": { "absolute": 50 }, "max": { "absolute": 150 }. Spelldimension_paddingexactly.- Block state keys in processors have a namespace (
minecraft:cardinal_direction). The condition that matches on states isminecraft:blockstate_match.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| No feature generates at all | No feature rule, the files are in the RP, or the rule file name differs from the identifier (MCPE-242144) | Put a file named after the identifier in the BP's feature_rules/ |
| scatter does not work | Usually a JSON error (a missing comma) | Lint it and read the Content Log |
| The biome filter is ignored | has_tag or a biome ID was used | Use has_biome_tag with a tag |
unknown variable variable.worldz | y comes before x and z in coordinate_eval_order | Put y last |
| A structure or tree is cut at a chunk border (no log) | It exceeds the 3x3 chunk limit | Shrink it to 16x16 or less and place it at x and z 8, or use jigsaw |
| An ore is shifted by +8 or a large ore stops on one side | ore_feature bug (MCPE-242122). /place feature places with the same x, z +8 offset {measured} | Give it a +8, +8 offset with a scatter |
| Square borders remain after changing a feature | Old chunks saved on disk | Create a new world. Deleting only the db files and keeping the seed also works |
| Nothing generates on superflat | Superflat does not run biomes, structure sets or feature rules | Look in a normal world or test with /place |
structure not found | There is no namespace folder under structures/ | Move it to structures/<namespace>/<name>.mcstructure |
Empty or non-existent pool | The pool ID, namespace, location or letter case is wrong | Align start_pool, the pool identifier and the location path |
Missing referenced asset | The processor list is outside worldgen/processors/ | Move the folder |
Invalid encoding in string, document root must not be followed by other values | Odd characters or a duplicate root in the pool file | Rewrite the file |
The structure is not in the /place structure list | No structure set, or no spacing | Create the structure set |
A jigsaw does not generate naturally and /locate hangs for 5 to 10 seconds | biome_filters or the structure set is wrong | Check the filter tag and the set. Use any_of for several biomes |
| Generation stops early | max_depth or max_distance_from_center is small | Raise both (limits 20 and 128) |
| A jigsaw structure always sits on a pedestal | The terrain_adaptation and start_height combination | Use "none" with a fitting start_height, or use beard_thin |
| A structure placed by a feature has no entities | Feature placement does not place entities | Place it with jigsaw (doMobSpawning needed) |
| Trees and flowers grow inside a jigsaw structure | Jigsaw generates before features, and features attach to grass and dirt floors | Use floor blocks without the grass and dirt tags and save empty cells as structure void |
onTick of a custom block placed by worldgen does not run | Ticks of blocks placed by features are not initialized | Use x and z 0 to 15, final_pass or search + feature, or handle it with a script |
| A custom biome has no vanilla villages | Vanilla structures look for vanilla biome IDs or tags | Add the replaced biome's tag (for example plains) to the custom biome |
Version conditions
- Data-driven jigsaw has been stable since the 1.21.50.26 preview, and the last format change was around 1.21.100, so use
"1.21.100". structure_template_featurewithformat_version1.13.0and with1.20.30both placed the whole structure with/place featureon 1.26.65{measured}.rotate_around_centerneeds format 1.26.20 or higher and its bug was fixed in 1.26.30.ground_levelstill has the same problem.multi_block_featureis 1.26.40, and theconditional_listfeature became stable on 2026-09-15 (26.50).- From 1.26.10,
query.get_level_seed_based_fractionfails in features withdoes not exist or not supported in this context(MCPE-240790, MCPE-242120). - Custom dimensions left experimental in 26.30, and from 26.50 the BP accepts JSON definitions in
dimensions/. The only generator isvoid, so feature rules and structure sets do not run naturally there. - Nether biome replacement works after the 2026-05 hotfix (MCPE-236399). Custom End biomes do not work.
- After 26.50 the vanilla feature files in BDS are bundled in
.brarchive. Unpack them to read the vanilla files. - A
.mcstructureexported from the 26.70 preview uses a new compression and does not load on the stable release. Export the structures of a pack for stable from the stable release. - Export structure blocks on Windows. Android export is blocked from 1.21.132, and iOS never had it.
How to check
- Put the pack in
development_behavior_packsand restart the game. Turn on the Content Log under Creator in Settings. - Create a new world after each change. New features and jigsaws do not apply to chunks that were already generated. Write down the seed to compare with the same seed.
- In chat, run
/place feature wiki:my_ore_featureand/place featurerule wiki:my_ore_feature_ruleto see the placement.ore_featureplaces +8 away on x and z from the given coordinates, so put the test stone box around X+8, Z+8. With the box centered on X, Z the command says "Feature could not be placed at this location." and places nothing{measured}./placecannot run from command blocks or functions. It also works in loaded chunks of a superflat world. The result of/place featurecan differ from natural placement, and the placed result sometimes stays invisible until the world is reopened. - Look at natural generation in new chunks of a normal world. The example ore shows as diamond block veins in stone between y -32 and 64. While testing, set large values such as
scatter_chance100 anditerations1, then lower them later. - Place the jigsaw with
/place structure wiki:hut ~~~, and check piece connections with/place structure ... keepJigsaws=trueor/place jigsaw <pool> <target> <depth> ~~~ true. Theterrain_matchingprojection does not work with/place. - Find a naturally generated jigsaw in plains with
/locate structure wiki:hut./locatefinds only jigsaw structures and custom biomes, not structures placed by features. - If it fails, look in the Content Log for
no valid version passed,description missing places_feature,No definition found for feature,structure not found,Empty or non-existent poolandMissing referenced asset. Some failures, like the 3x3 chunk cut, leave no log, so check the shape.
Further reading
- Worldgen: features, structures, jigsaw: Key summary, Feature and feature rule basics, Worldgen Molang, Notes by feature type, Modifying and removing vanilla generation, Custom blocks in worldgen, .mcstructure, Jigsaw limits and spacing, processor, Generation order
- Worldgen community reports: individual reports on feature types and jigsaw
- Biomes and custom dimensions: replace_biomes, Tags and vanilla structures, Custom dimensions
- Biome and dimension community reports
- World, structure and NBT tools: exporting and converting structures
- Functions and command patterns:
/place,/structure - Reference: ore_feature, structure_template_feature, jigsaw 1, jigsaw 2
- Pack folders and manifest: Making, delivering and debugging packs
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |
repo-damage-indicator | Premium Damage Indicator analysis (this repository) (damage-indicator/) | This project's material (the analyzed add-on is third-party work; facts only, rewritten) | 2026-11-13 |