Custom feature

Features are small decorations that can at most write to a 3×3 chunk area centered on the placement chunk. They're locally placed per-chunk and cannot be searched for using commands. Examples are trees, flowers, ore, etc.

Feature Type
A feature type (sometimes called feature) determines how and what to generate.

List of feature types
The IDs of all feature types are listed below:
 * &mdash;Does nothing. Useful for overwriting existing configured features.
 * &mdash;Only if there is water at the current block, places blocks in a circular formation using the specified radius and deepness.
 * &mdash;Fills all air blocks in a 16×1×16 layer of blocks. Used by the game in flat worlds.
 * &mdash;Can place a small structure.
 * &mdash;Places snow and replaces water with ice in snowy biomes.
 * &mdash;Replaces all target blocks in a certain radius with another block. If it doesn't find the target block at its position, it will move down before generating until it finds one.
 * &mdash;Randomly chooses one of two features with each having an equal chance.
 * &mdash;Randomly chooses a feature from a list with chances.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Only if there is water at the current block, places blocks in a circular formation using the specified radius and deepness.
 * &mdash;Fills all air blocks in a 16×1×16 layer of blocks. Used by the game in flat worlds.
 * &mdash;Can place a small structure.
 * &mdash;Places snow and replaces water with ice in snowy biomes.
 * &mdash;Replaces all target blocks in a certain radius with another block. If it doesn't find the target block at its position, it will move down before generating until it finds one.
 * &mdash;Randomly chooses one of two features with each having an equal chance.
 * &mdash;Randomly chooses a feature from a list with chances.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Places snow and replaces water with ice in snowy biomes.
 * &mdash;Replaces all target blocks in a certain radius with another block. If it doesn't find the target block at its position, it will move down before generating until it finds one.
 * &mdash;Randomly chooses one of two features with each having an equal chance.
 * &mdash;Randomly chooses a feature from a list with chances.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Replaces all target blocks in a certain radius with another block. If it doesn't find the target block at its position, it will move down before generating until it finds one.
 * &mdash;Randomly chooses one of two features with each having an equal chance.
 * &mdash;Randomly chooses a feature from a list with chances.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Randomly chooses one of two features with each having an equal chance.
 * &mdash;Randomly chooses a feature from a list with chances.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Replaces a single block using a list of targets and states.
 * &mdash;Generates a root column with a feature on top.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;Randomly chooses a feature from a list with each having an equal chance.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.
 * &mdash;A vegetation patch but it will try to waterlog the blocks placed.

Configured Feature
A feature type determines how to generate a feature, but the specific details need to be configured additionally. After configured, it is called a configured feature, or simply called a feature.

Configured features are stored as JSON files within a data pack in the path data/ /worldgen/configured_feature.

Placed feature
A configured feature determines what to be generated, but additional definition is required to determine where and how to place it in world generation. After added placement modifiers, it is called a placed feature.

Placed features are stored as JSON files within a data pack in the path data/ /worldgen/placed_feature.

JSON Format

 * : Root object.
 * : A configured feature's ID, or a object of a configured feature.
 * : A list of placement modifiers. They are applied in order.
 * : A placement modifier.
 * : The type of this placement modifier.
 * Other additional fields depend on the value of, described below.

Placement Modifier
A placement modifier takes in a initial position and returns empty or one or more block positions. Each position represents a generation attempt here. The placement modifier can return empty to cancel the attempt; return multiple copies of the same position to increase the number of attempts here; return some different positions to make multiple attempts in different positions.

For a placed feature, the placement modifiers in the list are applied in order to get the final list of positions from the initial position, then the feature will attempt to generate at those positions. When generating a feature directly, the initial position is the bottom northwest corner of a chunk. When referenced by another feature (such as being referenced by a feature of type, or by a structure pool), the initial position is where the feature is to be generated.

The possible values for and associated additional fields:


 * biome&mdash;Either returns the current position or empty. Only passes if the biome at the current position includes this placed feature. No additional field. Important: This modifier type cannot be used in placed features that are referenced from other configured features.


 * block_predicate_filter&mdash;Returns the current position when the predicate is passed, otherwise return empty.
 * : The block predicate to test.


 * carving_mask&mdash;Returns all positions in the current chunk that have been carved out by a carver. This does not include blocks carved out by noise caves.
 * : The carving step. Either  or.


 * count&mdash;Returns multiple copies of the current block position.
 * : Value between 0 and 256 (inclusive).


 * count_on_every_layer&mdash;In the horizontal relative range (0,0) to (16,16), at each vertical layer separated by air, lava or water, tries to randomly select the specified number of horizonal positions, whose Y coordinate is one block above this layer at this selected horizonal position. Return these selected positions.
 * ：Count on each layer. Value between 0 and 256 (inclusive).


 * environment_scan&mdash;Scans blocks either up or down, until the target condition is met. Returns the block position for which the target condition matches. If no target can be found within the maximum number of steps, returns empty.
 * : One of  or.
 * : Value between 1 and 32 (inclusive).
 * : The block predicate that is searched for.
 * : (optional) If specified, each step must match this block position in order to continue the scan. If a block that doesn't match it is met, but no target block found, returns empty.
 * : (optional) If specified, each step must match this block position in order to continue the scan. If a block that doesn't match it is met, but no target block found, returns empty.


 * height_range&mdash;Sets the Y coordinate to a value provided by a height provider. Returns the new position.
 * : The new Y coordinate.


 * heightmap&mdash;Sets the Y coordinate to one block above the heightmap. Returns the new position.
 * : The heightmap to use. One of,  ,  ,  ,   or.


 * in_square&mdash;For both X and Z, it adds a random value between 0 and 15 (both inclusive). This is a shortcut for a random_offset modifier with y_spread set to 0 and xz_spread as a uniform int from 0 to 15. No additional fields.


 * noise_based_count&mdash;When the noise value at the current block position is positive, returns multiple copies of the current block position, whose count is based on a noise value and can gradually change based on the noise value. When noise value is nagetive or 0, returns empty. The count is calculated by.
 * : Scales the noise input horizontally. Higher values make for wider and more spaced out peaks.
 * ：(optional, defaults to 0) Vertical offset of the noise.
 * : Ratio of noise value to count.


 * noise_threshold_count&mdash;Returns multiple copies of the current block position. The count is either below_noise or above_noise, based on the noise value at the current block position. First checks . If that is true, uses , otherwise.
 * : The threshold within the noise of when to use  or.
 * : The count when the noise is below the threshold. Value lower than 0 is treated as 0.
 * : The count when the noise is above the threshold. Value lower than 0 is treated as 0.


 * random_offset&mdash;Applies an offset to the current position. Note that the even though X and Z share the same int provider, they are individually sampled, so a different offset can be applied to X and Z.
 * : Value between -16 and 16 (inclusive).
 * : Value between -16 and 16 (inclusive).
 * : Value between -16 and 16 (inclusive).


 * rarity_filter&mdash;Either returns the current position or empty. The chance is calculated by.
 * : Must be a positive integer.


 * surface_relative_threshold_filter&mdash;Returns the current position if the surface is inside a range. Otherwise returns empty.
 * ：The heightmap to use. One of,  ,  ,  ,   or.
 * : The minimum relative height from the surface to current position.
 * : The maxinum relative height from the surface to current position.


 * surface_water_depth_filter&mdash;If the number of blocks of a motion blocking material under the surface (the top non-air block) is less than the specified depth, return the current position. Otherwise return empty.
 * : The maximum allowed depth.

History
已配置的地物