Skip to main content

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​

GoalMethod in this guideIf it does not fit
Generate ores, plants or small decorations naturallyFeature + feature rule-
Generate one structure of 16x16 or less naturallystructure_template_feature + feature ruleA 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 structureJigsaw (structure, template pool, structure set)-
Change the frequency of a vanilla feature or structure, or turn it offOverride it with the same identifier as vanillaLeaves, vines, glow lichen, mineshafts, caves and End structures cannot be removed
Change terrain height and shapeBiomes cannot do it. Change it with features that place air and stoneTerrain changes
Place only in a custom biomeGive the custom biome (minecraft:replace_biomes) a custom tag and filter on it in the feature ruleCustom biomes do not work in the End. Use a low-frequency q.noise zone
Place in a custom dimensionFeature rules and structure sets do not run naturallyPlace 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​

FormHow to write it
One structure as a featureGive 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 decorationplaces_block of a single_block_feature can take a block descriptor with states, { "name": "...", "states": { ... } }. The feature rule pass is after_surface_pass
Conditional branchesAdd early_out to an aggregate_feature. sequence_feature has bugs. conditional_list became stable on 2026-09-15
One coordinate onlyUse 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 featureCopy 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 frequencyOverride the vanilla structure set with the same identifier and change separation and spacing
processorReference 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_structures and singular structure_set do 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 featurerule still succeeded; whether such a rule generates naturally was not measured {measured}.
  • A feature file name may differ from the identifier. wiki:odd_ore in features/some_other_name.json loaded with no error and was placed with /place feature wiki:odd_ore {measured}.
  • places_feature equals 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 with Syntax error: Unexpected "wiki:rule_less_ore". To use it only with /place and no natural placement, reference it from a rule with iterations 0 {measured}.
  • A missing format_version gives no valid version passed; one that does not fit the feature type gives description 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_tag fails silently. Filter by tag, not by biome ID. Group several biomes with any_of.
  • The placement_pass order is pregeneration_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 use underground_pass, ground decoration after_surface_pass, trees first_pass or before_surface_pass.
  • iterations is a count per chunk and is rounded to an integer (0.4 is 0). scatter_chance is a per-chunk probability, either a percentage (5 is 5%) or { "numerator": 1, "denominator": 100 }.
  • The range covering a whole chunk is [0, 16] for uniform and [0, 15] for fixed_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.worldx or v.worldz, put y last in coordinate_eval_order. Call the height query as q.heightmap(v.worldx, v.worldz) (wrong arguments crashed world loading).
  • q.noise() does not depend on the seed. q.get_level_seed_based_fraction cannot be used in features.
  • Leaving out may_replace in ore_feature fails silently, and it does not accept block states or tag descriptors.
  • A structure file is structures/<namespace>/<name>.mcstructure and its identifier is namespace:name. Do not put spaces in the file name.
  • A template pool location is a path relative to structures/, without the extension and without a namespace: prefix (for example wiki/hut).
  • A pool element's element_type is minecraft:single_pool_element. legacy_single_pool_element is not supported. Put projection inside element; outside it silently becomes rigid.
  • A structure set needs a numeric spacing. Without it the structure is not in the /place structure list. separation is less than half of spacing.
  • max_depth is at most 20, max_distance_from_center at most 128.
  • start_height has the form { "type": "constant", "value": { "absolute": 0 } }. uniform uses min and max, like "min": { "absolute": 50 }, "max": { "absolute": 150 }. Spell dimension_padding exactly.
  • Block state keys in processors have a namespace (minecraft:cardinal_direction). The condition that matches on states is minecraft:blockstate_match.

Common mistakes​

SymptomCauseFix
No feature generates at allNo 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 workUsually a JSON error (a missing comma)Lint it and read the Content Log
The biome filter is ignoredhas_tag or a biome ID was usedUse has_biome_tag with a tag
unknown variable variable.worldzy comes before x and z in coordinate_eval_orderPut y last
A structure or tree is cut at a chunk border (no log)It exceeds the 3x3 chunk limitShrink 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 sideore_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 featureOld chunks saved on diskCreate a new world. Deleting only the db files and keeping the seed also works
Nothing generates on superflatSuperflat does not run biomes, structure sets or feature rulesLook in a normal world or test with /place
structure not foundThere is no namespace folder under structures/Move it to structures/<namespace>/<name>.mcstructure
Empty or non-existent poolThe pool ID, namespace, location or letter case is wrongAlign start_pool, the pool identifier and the location path
Missing referenced assetThe processor list is outside worldgen/processors/Move the folder
Invalid encoding in string, document root must not be followed by other valuesOdd characters or a duplicate root in the pool fileRewrite the file
The structure is not in the /place structure listNo structure set, or no spacingCreate the structure set
A jigsaw does not generate naturally and /locate hangs for 5 to 10 secondsbiome_filters or the structure set is wrongCheck the filter tag and the set. Use any_of for several biomes
Generation stops earlymax_depth or max_distance_from_center is smallRaise both (limits 20 and 128)
A jigsaw structure always sits on a pedestalThe terrain_adaptation and start_height combinationUse "none" with a fitting start_height, or use beard_thin
A structure placed by a feature has no entitiesFeature placement does not place entitiesPlace it with jigsaw (doMobSpawning needed)
Trees and flowers grow inside a jigsaw structureJigsaw generates before features, and features attach to grass and dirt floorsUse 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 runTicks of blocks placed by features are not initializedUse x and z 0 to 15, final_pass or search + feature, or handle it with a script
A custom biome has no vanilla villagesVanilla structures look for vanilla biome IDs or tagsAdd 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_feature with format_version 1.13.0 and with 1.20.30 both placed the whole structure with /place feature on 1.26.65 {measured}. rotate_around_center needs format 1.26.20 or higher and its bug was fixed in 1.26.30. ground_level still has the same problem.
  • multi_block_feature is 1.26.40, and the conditional_list feature became stable on 2026-09-15 (26.50).
  • From 1.26.10, query.get_level_seed_based_fraction fails in features with does 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 is void, 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 .mcstructure exported 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​

  1. Put the pack in development_behavior_packs and restart the game. Turn on the Content Log under Creator in Settings.
  2. 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.
  3. In chat, run /place feature wiki:my_ore_feature and /place featurerule wiki:my_ore_feature_rule to see the placement. ore_feature places +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}. /place cannot run from command blocks or functions. It also works in loaded chunks of a superflat world. The result of /place feature can differ from natural placement, and the placed result sometimes stays invisible until the world is reopened.
  4. 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_chance 100 and iterations 1, then lower them later.
  5. Place the jigsaw with /place structure wiki:hut ~~~, and check piece connections with /place structure ... keepJigsaws=true or /place jigsaw <pool> <target> <depth> ~~~ true. The terrain_matching projection does not work with /place.
  6. Find a naturally generated jigsaw in plains with /locate structure wiki:hut. /locate finds only jigsaw structures and custom biomes, not structures placed by features.
  7. 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 pool and Missing referenced asset. Some failures, like the 3x3 chunk cut, leave no log, so check the shape.

Further reading​

Sources
idSourceLicenseCommitAccessed
private-researchPrivate research (-)-2026-11-13
bedrock-wikiBedrock WikiCC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository)0930b392026-11-13
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)2026-11-13
repo-damage-indicatorPremium 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