Skip to main content

Feature and feature rule reference (12/14)

This page excerpts the reference from MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). Relative links in the original are removed.

(Source: ms-learn, creator/Reference/Content/FeaturesReference/Examples/Features/minecraft_structure_template_feature.md)

Feature Documentation - 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.

[!Note] This item requires a format version of at least 1.20.30.

Structure Template Feature Properties​

NameDefault ValueTypeDescription
adjustment_radiusnot setInteger numberHow far the structure is allowed to move when searching for a valid placement position. Search is radial, stopping when the nearest valid position is found. Defaults to 0 if omitted.
constraintsnot setConstraints itemSpecific constraints that must be satisfied when placing this structure.
descriptionnot setDescription item
facing_direction"<"north", "south", "east", "west", "random"not setStringDirection the structure will face when placed in the world. Defaults to "random" if omitted.
format_versionnot setString
ground_levelnot setInteger numberSpecifies which Y coordinate of the structure is considered its ground level.
rotate_around_centerfalseBoolean true/falseIf true, the structure is centered on the placement position before rotation is applied so it rotates around its center rather than its origin corner.
ground_level​

Specifies which Y coordinate of the structure is considered its ground level. This value determines which layer of the structure is checked by the "grounded" and "leveled" constraints and is used as a downward vertical offset during placement. If the value exceeds the structure's height, it is clamped to the maximum valid value and a content warning is emitted. Defaults to 0.

rotate_around_center​

If true, the structure is centered on the placement position before rotation is applied so it rotates around its center rather than its origin corner. This item requires a format version of at least 1.26.20.

Constraints​

Constraints Properties​

JSON path: constraints

NameDefault ValueTypeDescription
block_intersectionnot setBlock Intersection itemWhen specified, ensures the structure only intersects with allowlisted blocks.
groundednot setObjectWhen specified, ensures the structure's ground level touches the ground.
levelednot setLeveled itemWhen specified, ensures the structure's ground level is placed on mostly flat terrain.
unburiednot setObjectWhen specified, ensures the structure has air above it.

Block Intersection​

Block Intersection Properties​

JSON path: constraints > block_intersection

NameDefault ValueTypeDescription
block_allowlist|block_whitelistnot setArray of strings
only_check_intersection_for_motion_blocking_blocksnot setBoolean true/falseIf true, only motion-blocking blocks within the structure are checked for intersections with blocks in "block_allowlist|block_whitelist".
only_check_intersection_for_motion_blocking_blocks​

If true, only motion-blocking blocks within the structure are checked for intersections with blocks in "block_allowlist|block_whitelist". If false, all blocks in the structure except empty ones are checked for intersections, including air.

Leveled​

Leveled Properties​

JSON path: constraints > leveled

NameDefault ValueTypeDescription
max_steepnessnot setInteger numberMaximum allowed height difference between the placement position and terrain samples taken halfway along each side of the structure.
max_steepness​

Maximum allowed height difference between the placement position and terrain samples taken halfway along each side of the structure. A valid terrain sample consists of a solid block with a non‑solid block above it. Defaults to 2.

Description​

Description Properties​

JSON path: description

NameDefault ValueTypeDescription
identifiernot setStringThe name of this feature in the form 'namespace_name:feature_name'. 'feature_name' must match the filename.

Samples​

Example​

"minecraft:structure_template_feature": {
"format_version": "1.13.0",
"minecraft:aggregate_feature": {
"format_version": "1.13.0",
"minecraft:structure_template_feature": {
"description": {
"identifier": "example:hot_air_balloon_feature"
},
"structure_name": "example:hot_air_balloon",
"adjustment_radius": 8,
"facing_direction": "random",
"constraints": {
"unburied": {},
"block_intersection": {
"block_allowlist": [
"minecraft:air"
]
}
}
}
}
}

(Source: ms-learn, creator/Reference/Content/FeaturesReference/Examples/Features/minecraft_surface_relative_threshold_feature.md)

Feature Documentation - 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 the 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.

[!Note] This item requires a format version of at least 1.20.30.

Surface Relative Threshold Feature Properties​

NameDefault ValueTypeDescription
descriptionnot setDescription item
format_versionnot setString
minimum_distance_below_surfacenot setInteger numberThe minimum number of blocks required to be between the estimated surface level and a valid place for this feature. Defaults to zero.
Description​

Description Properties​

JSON path: description

NameDefault ValueTypeDescription
identifiernot setStringThe name of this feature in the form 'namespace_name:feature_name'. 'feature_name' must match the filename.

Samples​

Example​

"minecraft:surface_relative_threshold_feature": {
"format_version": "1.13.0",
"minecraft:surface_relative_threshold_feature": {
"description": {
"identifier": "example:underwater_magma_underground_feature"
},
"feature_to_place": "log_decoration_feature",
"minimum_distance_below_surface": 2
}
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13