Wiki 9Minecraft Wiki 9Minecraft

Generating Patches in World Generation

How to scatter organic clusters of plants, blocks, or terrain surfaces using Bedrock features.

5Sections
4Code examples
3Known errors

Generating natural-looking clusters of blocks—such as flower beds, pumpkin patches, or mud pits—requires combining placement logic with block definitions in your Behavior Pack. Instead of placing blocks individually or relying on rigid structure files, you can use Bedrock's feature system to scatter features organically across the terrain surface. In Bedrock world generation, you achieve this either by chaining a scatter feature to a single-block feature or by using a dedicated vegetation patch feature.

Two Approaches to Patch Generation

When you want to generate a patch of blocks in Minecraft Bedrock, you have two primary methods depending on what the patch represents. The first and most common method for surface decoration is chaining a `minecraft:scatter_feature` to a `minecraft:single_block_feature` (or `minecraft:weighted_random_feature`). In this setup, the feature rule picks a chunk and a general center point for the patch, the scatter feature runs a loop to pick multiple random coordinates around that center, and the single block feature attempts to place your plant or block at each chosen coordinate.

The second method uses `minecraft:vegetation_patch_feature`. This feature type is built for biome-style terrain splotches, like the moss patches in Lush Caves or mud pools in Mangrove Swamps. Rather than just placing blocks on top of existing dirt, a vegetation patch actually replaces a disk of the ground itself with a new substrate block and optionally triggers a secondary feature (like tall grass or custom flora) to grow directly on top of the newly placed ground.

Building a Surface Scatter Patch

To build a standard flower or pumpkin patch, you need three separate JSON files in your Behavior Pack: a feature rule, a scatter feature, and a single block feature. The feature rule (`BP/feature_rules/`) acts as the entry point, deciding which biomes the patch spawns in and finding the initial heightmap coordinate. Instead of scattering individual flowers across the entire chunk from the feature rule, you only run the feature rule once or twice per chunk to establish the patch's center.

The `minecraft:scatter_feature` is what actually creates the clustered shape. By using a `gaussian` (bell-curve) distribution for the X and Z coordinates within the scatter feature, most of your blocks will bunch up near the center point, with fewer blocks spawning toward the outer edges. For each scattered coordinate, you use the `query.heightmap` Molang expression on the Y axis so every individual flower snaps cleanly to the terrain surface rather than floating in the air or burying itself into a hillside.

BP/features/custom_flower_patch_scatter.json
{
  "format_version": "1.13.0",
  "minecraft:scatter_feature": {
    "description": {
      "identifier": "wiki:custom_flower_patch_scatter"
    },
    "places_feature": "wiki:custom_flower_single_block",
    "iterations": 32,
    "x": {
      "distribution": "gaussian",
      "extent": [ -6, 6 ]
    },
    "z": {
      "distribution": "gaussian",
      "extent": [ -6, 6 ]
    },
    "y": "query.heightmap(variable.worldx, variable.worldz)"
  }
}

Placing the Patch Blocks

The `places_feature` field in your scatter feature points to the leaf feature that places the actual block. A `minecraft:single_block_feature` is ideal here because it lets you enforce strict survival and attachment rules for each attempt in the scatter loop. Even if the scatter feature runs 32 times, only the attempts that land on valid ground will succeed, which naturally thins out the patch around rocks, water, and trees.

In the single block feature below, `may_replace` ensures the block only spawns in empty air, and `may_attach_to` guarantees it only places on top of grass or dirt. If you want a mixed patch—such as a mix of red poppies, dandelions, and fern—replace the single block feature with a `minecraft:weighted_random_feature` that selects between several different single block features.

BP/features/custom_flower_single_block.json
{
  "format_version": "1.13.0",
  "minecraft:single_block_feature": {
    "description": {
      "identifier": "wiki:custom_flower_single_block"
    },
    "places_block": "minecraft:red_flower",
    "enforce_survivability_rules": true,
    "enforce_placement_rules": true,
    "may_replace": [
      "minecraft:air"
    ],
    "may_attach_to": {
      "bottom": [
        "minecraft:grass_block",
        "minecraft:dirt"
      ]
    }
  }
}

Using the Vegetation Patch Feature

When your patch needs to alter the ground material itself, reach for `minecraft:vegetation_patch_feature`. This feature scans vertically within a given `vertical_range` to find a surface matching your `replaceable_blocks` list. Once found, it carves out a rough circle based on `horizontal_radius` and fills it down to `depth` with your chosen `ground_block`.

On top of the newly placed substrate, the feature can automatically run another feature for every surface block it creates, controlled by `vegetation_chance`. This makes it effortless to generate things like a corrupted mycelial patch that replaces grass with mycelium and immediately sprouts mushrooms on top, all from a single feature file.

FieldWhat it doesNotes
replaceable_blocksList of block identifiers that the patch is allowed to overwrite.Must include surface blocks like `minecraft:grass_block` if generating on the overworld surface.
ground_blockThe block identifier used to fill the base of the patch.Replaces blocks matched by `replaceable_blocks`.
vegetation_featureIdentifier of the feature to spawn on top of the placed ground blocks.Triggered randomly per surface block based on `vegetation_chance`.
surfaceDetermines whether the patch attaches to the floor or ceiling.Accepts `floor` or `ceiling`.
vertical_rangeHow many blocks up and down from the feature origin to search for a valid surface.Keep this around 4 to 6 so patches wrap smoothly over hilly terrain.
extra_edge_column_chanceProbability (0.0 to 1.0) of adding extra blocks around the perimeter.Higher values break up the square grid edges and make the patch look more organic.
BP/features/mossy_ground_patch_feature.json
{
  "format_version": "1.16.0",
  "minecraft:vegetation_patch_feature": {
    "description": {
      "identifier": "wiki:mossy_ground_patch_feature"
    },
    "replaceable_blocks": [
      "minecraft:stone",
      "minecraft:dirt",
      "minecraft:grass_block"
    ],
    "ground_block": "minecraft:moss_block",
    "vegetation_feature": "wiki:custom_flower_single_block",
    "surface": "floor",
    "depth": {
      "range_min": 1,
      "range_max": 2
    },
    "vertical_range": 5,
    "vegetation_chance": 0.25,
    "horizontal_radius": {
      "range_min": 3,
      "range_max": 6
    },
    "extra_edge_column_chance": 0.3
  }
}

Connecting the Patch to a Feature Rule

Neither a scatter feature nor a vegetation patch feature will appear in the world until it is called by a feature rule in `BP/feature_rules/`. For surface patches, set the `placement_pass` to `surface_pass` or `vegetal_decoration_pass`. Using `surface_pass` is generally best for `minecraft:vegetation_patch_feature` so the ground swaps out before vanilla trees and flowers try to generate on top of it.

In the feature rule's `distribution` object, keep `iterations` to `1` and control the rarity of the entire patch using `scatter_chance`. If you put a high iteration count in the feature rule AND a high iteration count in your scatter feature, you will multiply the placements and coat the entire chunk in blocks instead of getting distinct, isolated patches.

BP/feature_rules/overworld_flower_patch_rule.json
{
  "format_version": "1.13.0",
  "minecraft:feature_rules": {
    "description": {
      "identifier": "wiki:overworld_flower_patch_rule",
      "places_feature": "wiki:custom_flower_patch_scatter"
    },
    "conditions": {
      "placement_pass": "vegetal_decoration_pass",
      "minecraft:biome_filter": [
        {
          "test": "has_biome_tag",
          "operator": "==",
          "value": "plains"
        }
      ]
    },
    "distribution": {
      "iterations": 1,
      "scatter_chance": 10.0,
      "x": {
        "distribution": "uniform",
        "extent": [ 0, 16 ]
      },
      "z": {
        "distribution": "uniform",
        "extent": [ 0, 16 ]
      },
      "y": "query.heightmap(variable.worldx, variable.worldz)"
    }
  }
}

Which versions this applies to

Scatter, single block, and feature rules are stable in format version 1.13.0 and above. `minecraft:vegetation_patch_feature` requires format version 1.16.0 or higher. No experimental toggles are needed for any of these features in current Bedrock releases.

When it does not work

What you seeWhyThe fix
Blocks in a scatter patch spawn floating in the air or buried underground on hills.Both the feature rule and the scatter feature evaluated `query.heightmap(variable.worldx, variable.worldz)` on the Y axis. Because coordinate offsets in a feature chain are additive by default, evaluating the heightmap twice adds the terrain height to itself (e.g., 64 + 64 = 128).Evaluate `query.heightmap(variable.worldx, variable.worldz)` in either the feature rule OR the scatter feature, and set `"y": 0` in the other. Putting `"y": 0` in the feature rule and the heightmap query in the scatter feature ensures every individual block in the patch snaps to its own exact surface elevation.
Content Log shows: "Failed to load feature... Identifier must match file name"Unlike blocks, entities, and items, Bedrock's feature and feature rule parser strictly requires the file name (excluding the `.json` extension) to match the exact path part of the `identifier` after the colon.If your identifier is `"wiki:custom_flower_patch_scatter"`, rename the JSON file to `custom_flower_patch_scatter.json`.
The vegetation patch feature never places anything on grassy overworld terrain.The `replaceable_blocks` array uses an outdated block identifier or only lists `minecraft:dirt` without including the top grass layer.Include both `"minecraft:grass_block"` (or `"minecraft:grass"` if targeting older format versions prior to the block flattening) and `"minecraft:dirt"` inside `replaceable_blocks`.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.