FEATURES DOCUMENTATION
Version: 1.21.40.3

Index

Overview
JSON format
Adding features
Supported features
minecraft:aggregate_feature
minecraft:sequence_feature
minecraft:beards_and_shavers
minecraft:cave_carver_feature
minecraft:conditional_list
minecraft:fossil_feature
minecraft:geode_feature
minecraft:growing_plant_feature
minecraft:nether_cave_carver_feature
minecraft:multiface_feature
minecraft:ore_feature
minecraft:partially_exposed_blob_feature
minecraft:rect_layout
minecraft:scan_surface
minecraft:scatter_feature
minecraft:sculk_patch_feature
minecraft:search_feature
minecraft:single_block_feature
minecraft:snap_to_surface_feature
minecraft:structure_template_feature
minecraft:surface_relative_threshold_feature
minecraft:underwater_cave_carver_feature
minecraft:tree_feature
minecraft:vegetation_patch_feature
minecraft:weighted_random_feature
Attaching features
Feature rules
Feature rule schema
Coordinate Evaluation Order
Coordinate Range
Feature Rule Conditions
Feature Rule Definition
Feature Rule Description
Feature Rule JSON File
Filter Group
Filter Test
Random Distribution Type
Scatter Chance
Scatter Params
Back to top

Overview

Features are decorations scattered throughout the world. Things such as trees, plants, flowers, springs, ore, and coral are all features. Basically, if it isn't the terrain or a mob, it's probably a feature!
Features can be standalone or composed of multiple sub-features. In practice, most features in Minecraft are defined as a chain of two or more features. These chains typically end with features that place blocks in the world. Other feature types control flow such as conditional, sequential, or random distribution.
Back to top

JSON format

All features must specify the version that they target via the "format_version" field. The remainder of the data is contained in independet JSON sub-objects for each supported feature type. These feature types define the behavior of the feature and include properties specific to that behavior. To be valid, a definition must include exactly one of these type objects. See the full feature schema below for additional details and the full list of supported feature types.

Here is a sample feature

Back to top

Adding features

Features are read from JSON files in the "features" subfolder of behavior packs. Loading enforces one feature per file; the file name and the name of the feature must match. Feature names can include a namespace of the form "namespace:feature_name" to help distinguish them from features that may be in other behavior packs. This namespace is not considered when matching the filename to the feature name. For example, in a file called "my_tree_feature.json" both "my_tree_feature" and "my_pack_name:my_tree_feature" would be valid identifiers. If two behavior packs define the same feature name (including namespace), then the feature from the highest pack in the stack will be used. This allows users to override base features if desired.
Back to top

Supported features

minecraft:aggregate_feature

'minecraft:aggregate_feature' places a collection of features in an arbitary order. All features in the collection use the same input position. Features should not depend on each other, as there is no guarantee on the order the features will be placed.
Succeeds if: At lease one feature is placed successfully.
Fails if: All features fail to be placed.

Example use: scattering multiple different plants around a monument.

Back to top

minecraft:sequence_feature

'minecraft:sequence_feature' places a collection of features sequentially, in the order they appear in data. The output position of the previous feature is used as the input position for the next. For example, a tree feature is placed at (0, 0, 0) and places blocks up to (0, 10, 0). The next feature in the sequence begins at (0, 10, 0).
Succeeds if: All features in the sequence are successfully placed.
Fails if: Any feature in the sequence fails to be placed. Features that have not yet been placed at the time of failure are skipped.

Example use: Scattering fruit throughout the canopy of a tree.

Back to top

minecraft:beards_and_shavers

'minecraft:beards_and_shavers' will build a 'beard' or 'shave' out space so as to provide a clear space for a feature to place.
Succeeds if: a beard/shave is made (this should always happen).
Fails if: will always return placement pos, but interior feature placement not guaranteed.

Example use: provides an area for interior structure placement

Back to top

minecraft:cave_carver_feature

'minecraft:cave_carver_feature' carves a cave through the world in the current chunk, and in every chunk around the current chunk in an 8 radial pattern.This feature will also only work when placed specifically in the pass "pregeneration_pass".

Example use: Carve caves normally.

Back to top

minecraft:conditional_list

'minecraft:conditional_list' Places the first suitable feature within a collection.
These conditional features will be evaluated in order.
Succeeds if: A condition is successfully resolved.
Fails if: No condition is successfully resolved.

Example use: assigning a feature to an expression

Back to top

minecraft:fossil_feature

'minecraft:fossil_feature' generates a skeletal structure composed of bone blocks and parametric ore blocks.Succeeds if: The fossil is placed.
Fails if: The fossil is not placed because it overlaps with another structure or because its bounding box has too many corners occupied by air or fluid.

Example use: Fossil composed of bone blocks and coal ore blocks.

Back to top

minecraft:geode_feature

'minecraft:geode_feature' generates a rock formation to simulate a geode. Each layer of, and block within, the geode can be replaced. Succeeds if: At least one block within the geode is placed.
Fails if: All blocks within the geode fail to be placed.

Example use: Diamond geodes with emerald blocks inside and obsidian on the outside.

Back to top

minecraft:growing_plant_feature

'minecraft:growing_plant_feature' places a growing plant in the world. A growing plant is a column that is anchored either to the ceiling or the floor, based on its growth direction.
The growing plant has a body and a head, where the head is the tip of the plant, and the body consists of the remainder blocks.
This feature can be used to define growing plants with variable body and head blocks, e.g. Cave Vines.

Example use: Defining a growing plant feature with variable body and head blocks and height distribution.

Back to top

minecraft:nether_cave_carver_feature

'minecraft:nether_cave_carver_feature' carves a cave through the Nether in the current chunk, and in every chunk around the current chunk in an 8 radial pattern.This feature will also only work when placed specifically in the pass "pregeneration_pass".

Example use: Carve nether caves normally.

Back to top

minecraft:multiface_feature

'minecraft:multiface_feature' places one or a few multiface blocks on floors/walls/ceilings. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if this feature can be placed on them based on the list provided in the 'can_place_on' field. If no 'can_replace_on' field is specified, the 'place_block' block can be placed on any existing block.
This feature will also try to spread the 'place_block' block around the location in world the feature is placed.
Succeeds if: At least one block is successfully placed.
Fails if: All block placements fail.

Example use: Blue vines in caves.

Back to top

minecraft:ore_feature

'minecraft:ore_feature' places a vein of blocks to simulate ore deposits. Despite the name, any block can be placed by this feature. During placement, existing world blocks are checked to see if they can be replaced by the new ore block based on the list provided in the 'may_replace' field of a 'replace_rules' entry. If no 'may_replace' field is specified in a 'replace_rule' entry, the ore block can replace any existing block.
Succeeds if: At least one ore block is successfully placed.
Fails if: All ore block placements fail.

Example use: Malachite ore in different materials.

Example use: Oil deposits in the sand.

Back to top

minecraft:partially_exposed_blob_feature

'minecraft:partially_exposed_blob_feature' generates a blob of the specified block with the specified dimensions For the most part the blob is embedded in the specified surface, however a single side is allowed to be exposed.

Example use: Blobs of Magma blocks partially embedded in the floors of flooded caves.

Back to top

minecraft:rect_layout

'minecraft:rect_layout' scans the surface of a Chunk, calling place() on the surface of each block column.
Succeeds if: A Feature is successfully placed within a Chunk.
Fails if: No Feature could be placed within a Chunk.

Example use: Scans the surface of a chunk and places a feature if able

Back to top

minecraft:scan_surface

'minecraft:scan_surface' scans the surface of a Chunk, calling place() on the surface of each block column.
Succeeds if: A Feature was successfully placed during the scan.
Fails if: No Feature was placed during the course of the scan.

Example use: Scans the surface of a chunk and places a feature if able

Back to top

minecraft:scatter_feature

'minecraft:scatter_feature' scatters a feature throughout a chunk. The 'x', 'y', and 'z' fields are per-coordinate parameters. Note that coordinates represent an offset from the input position, not an absolute position. Coordinates may be a single value, a random distribution, or Molang expression that resolves to a numeric value. The 'coordinate_eval_order' field is provided for finer control of coordinate resolution (particularly when using the 'grid' distribution). 'iterations' controls how many individual placements should occur if the 'scatter_chance' check succeeds. The 'scatter_chance' check happens once, so either all placements will run or none will.
Succeeds if: At least one feature placement succeeds.
Fails if: All feature placements fail.

Example use: Scattering flowers at sea level across half the chunks in a biome.

Back to top

minecraft:sculk_patch_feature

Feature type 'minecraft:sculk_patch_feature' has not yet been documented.
Back to top

minecraft:search_feature

'minecraft:search_feature' sweeps a volume searching for a valid placement location for its referenced feature. The 'search_volume' field specifies the axis-aligned bounding box that defines the boundaries of the search. The search sweeps along the axis defined by the 'search_axis' field, layer by layer. For example, if 'search_axis' = '-x', blocks with greater x values will be checked before blocks with lower x values. Each layer is searched from the bottom-left to the top-right before moving to the next layer along the axis. By default, only one valid position must be found, but this can be altered by specifying the 'required_successes' field. If fewer than the required successes are found, no placement will occur.
Succeeds if: The number of valid positions is equal to the value specified by 'required_successes'.
Fails if: The number of valid positions is less than the value specified by 'required_successes'.

Example use: Attaching apples to a tree canopy

Back to top

minecraft:single_block_feature

'minecraft:single_block_feature' places a single block in the world. The 'places_block' field supports a single block or a list of weighted blocks, where the weight defines how likely it is for that block to be selected. The 'may_attach_to' and 'may_replace' fields are allowlists which specify where the block can be placed. If these fields are omitted, the block can be placed anywhere. The 'may_not_attach_to' field is a denylist that specifies what blocks can't be close to the placement location. The 'randomize_rotation' field will randomize the block's cardinal orientation. The block's internal survivability and placement rules can optionally be enforced with the 'enforce_survivability_rules' and 'enforce_placement_rules' fields. These rules are specified per-block and are typically designed to produce high quality gameplay or natural behavior. However, enabling this enforcement may make it harder to debug placement failures.
Succeeds if: The block is successfully placed in the world.
Fails if: The block fails to be placed.

Example use: Placing a single pumpkin or carved pumpkin block where carved pumpkins are less likely to appear.

Back to top

minecraft:snap_to_surface_feature

'minecraft:snap_to_surface_feature' snaps the y-value of a feature placement pos to the floor or the ceiling within the provided 'vertical_search_range'. The placement biome is preserved. If the snap position goes outside of the placement biome, placement will fail.

Example use: Define a feature that snaps the 'cave_vine_feature' to the ceiling.

Back to top

minecraft:structure_template_feature

'minecraft:structure_template_feature' places a structure in the world. The structure must be stored as a .mcstructure file in the "structures" subdirectory of a behavior pack. It is possible to reference structures that are part of other behavior packs, they do not need to come from the same behavior pack as this feature. Constraints can be defined to specify where the structure is allowed to be placed. During placement, the feature will search for a position within the 'adjustment_radius' that satisfies all constraints. If none are found, the structure will not be placed.
Succeeds if: The structure is placed in the world.
Fails if: The structure fails to be placed within the world.

Example use: Place a hot air balloon structure that "floats" in the air.

Back to top

minecraft:surface_relative_threshold_feature

'minecraft:surface_relative_threshold_feature' determines whether the provided position is below the estimated surface level of the world, and places a feature if so.If the provided position is above configured surface or the surface is not available, placement will fail. This feature only works for Overworld generators using world generation 1.18 or later.

Example use: Define a feature that places the 'underwater_magma_snap_to_surface_feature', if the given position is at least two blocks below estimated surface level.

Back to top

minecraft:underwater_cave_carver_feature

'minecraft:underwater_cave_carver_feature' carves a cave through the world in the current chunk, and in every chunk around the current chunk in an 8 radial pattern.This feature will specifically target creating caves only below sea level.
This feature will also only work when placed specifically in the pass "pregeneration_pass".

Example use: Carve caves normally.

Back to top

minecraft:tree_feature

'minecraft:tree_feature' will place a tree in the world. A tree consists of a column that is anchored to a base block with set parameters for what it can be placed on and canopy that extends from the column.
Trees support multiple types of canopies, trunks, and roots. Trees will only grow in certain biomes if the 'may_grow_on' property includes the blocks commonly found on the surface of that biome.
Succeeds if: The tree is placed in the world.
Fails if: The tree fails to be placed within the world.

Example use: Azalea tree.

Back to top

minecraft:vegetation_patch_feature

'minecraft:vegetation_patch_feature' scatters a vegetation feature in an area. The vegetation feature’s appearance can be modified by adjusting the radius and depth that it will generate.
Succeeds if: At least one ground base block was placed.
Fails if: No ground base blocks were placed.

Example: A pool of clay with dripleaves.

Back to top

minecraft:weighted_random_feature

'minecraft:weighted_random_feature' randomly selects and places a feature based on a weight value. Weights are relative, with higher values making selection more likely.
Succeeds if: The selected feature is placed.
Fails if: The selected feature fails to be placed.

Example use: Selecting and placing a variant of a flower.

Back to top

Feature schema

Here is the complete feature schema



Attaching features

Features must be attached to at least one biome in order to show up in the world. During world generation, biomes attempt to place their attached features chunk-by-chunk. Features can be attached via a feature rule definition
Back to top

Feature rules

Feature rules are separate JSON definition files found in the "feature_rules" subfolder of behavior packs. Feature rules follow the same filename rules as features. Each feature rule controls exactly one feature and serves as the root of a chain of feature data. To attach a feature to a biome with a feature rule, the "conditions" object must include the "minecraft:biome_filter" field. This is a list of filter tests that are performed on each biome to determine if the feature should be attached. Most relevant is the "has_biome_tag" test.

Here is a sample feature rule

Back to top

Feature rule schema

Coordinate Evaluation Order

CoordinateEvaluationOrder enumerator, supported values are: "xyz", "xzy", "yxz", "yzx", "zxy", "zyx".
Back to top

Coordinate Range

Represents the scatter distrubution over a coordinate (x/y/z), can also be built by an expression.

Name Type Required? Description
distribution Required Type of distribution. Supported distributions are defined by "Random Distribution Type".
extent Array Required Lower and upper bound (inclusive) of the scatter range, as an offset from the input point to scatter around.
grid_offset Integer Optional When the distribution type is grid, defines the offset along this axis.
step_size Integer Optional When the distribution type is grid, defines the distance between steps along this axis.
Back to top

Feature Rule Conditions

Name Type Required? Description
minecraft:biome_filter Object of type Filter Group Optional List of filter tests to determine which biomes this rule will attach to.
placement_pass String Required When the feature should be placed relative to others. Earlier passes in the list are guaranteed to occur before later passes. Order is not guaranteed within each pass.
Back to top

Feature Rule Definition

Name Type Required? Description
conditions Object of type Feature Rule Conditions Required Parameters to control where and when the feature will be placed.
description Object of type Feature Rule Description Required Identifier for the Feature Rule and Feture to place.
distribution Object of type Scatter Params Optional Parameters controlling the initial scatter of the feature.
Back to top

Feature Rule Description

Name Type Required? Description
identifier String Required The name of this feature rule in the format 'namespace_name:rule_name'. 'rule_name' must match the filename.
places_feature String Required Named reference to the feature controlled by this rule.
Back to top

Feature Rule JSON File

Name Type Required? Description
format_version String Required Version of the JSON schema used by this file.
minecraft:feature_rules Object of type Feature Rule Definition Required A single Feature Rule Definition.
Back to top

Filter Group

Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.

Name Type Required? Description
AND Object of type Filter Group Optional Evaluates all tests in the group, all must pass in order for the group to pass.
NOT Object of type Filter Group Optional Evaluates all tests in the group, all must fail in order for the group to pass.
OR Object of type Filter Group Optional Evaluates tests in the group, one or more must pass in order for the group to pass.
all Object of type Filter Group Optional Evaluates all tests in the group, all must pass in order for the group to pass.
all_of Object of type Filter Group Optional Evaluates all tests in the group, all must pass in order for the group to pass.
any Object of type Filter Group Optional Evaluates tests in the group, one or more must pass in order for the group to pass.
any_of Object of type Filter Group Optional Evaluates tests in the group, one or more must pass in order for the group to pass.
none_of Object of type Filter Group Optional Evaluates all tests in the group, all must fail in order for the group to pass.
Back to top

Filter Test

Name Type Required? Description
domain Object Optional The domain the test should be performed in.
operator Object Optional The comparison to apply with 'value'.
subject Object Optional The subject of this filter test.
test String Required The name of the test to apply.
value Object Optional The value being compared with the test.
Back to top

Random Distribution Type

RandomDistributionType enumerator, supported values are: "uniform", "gaussian", "inverse_gaussian", "triangle", "fixed_grid", "jittered_grid".
Back to top

Scatter Chance

Scatter probability represented by an expression or an object with a numerator and denominator.

Name Type Required? Description
denominator Integer Required Denominator for scatter probability.
numerator Integer Required Numerator for scatter probability.
Back to top

Scatter Params

Controls the scatter distribution of a particular object.

Name Type Required? Description
coordinate_eval_order Optional The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to "xzy". Supported orders are defined by "Coordinate Evaluation Order".
iterations Object of type struct SharedTypes::Legacy::ExpressionNode Required Number of scattered positions to generate.
scatter_chance Object of type Scatter Chance Optional Probability that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.
x Object of type Coordinate Range Required Distribution for the coordinate (evaluated each iteration).
y Object of type Coordinate Range Required Distribution for the coordinate (evaluated each iteration).
z Object of type Coordinate Range Required Distribution for the coordinate (evaluated each iteration).
Back to top