Edit

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

Name Default Value Type Description
adjustment_radius not set Integer number How 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.
constraints not set Constraints item Specific constraints that must be satisfied when placing this structure.
description not set Description item
facing_direction"<"north", "south", "east", "west", "random" not set String Direction the structure will face when placed in the world. Defaults to "random" if omitted.
format_version not set String
ground_level not set Integer number Specifies which Y coordinate of the structure is considered its ground level.
rotate_around_center false Boolean true/false 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.

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

Name Default Value Type Description
block_intersection not set Block Intersection item When specified, ensures the structure only intersects with allowlisted blocks.
grounded not set Object When specified, ensures the structure's ground level touches the ground.
leveled not set Leveled item When specified, ensures the structure's ground level is placed on mostly flat terrain.
unburied not set Object When specified, ensures the structure has air above it.

Block Intersection

Block Intersection Properties

JSON path: constraints > block_intersection

Name Default Value Type Description
block_allowlist|block_whitelist not set Array of strings
only_check_intersection_for_motion_blocking_blocks not set Boolean true/false If 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

Name Default Value Type Description
max_steepness not set Integer number Maximum 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

Name Default Value Type Description
identifier not set String The 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"
          ]
        }
      }
    }
  }
}