Every rule is defined by a JSON object with specific fields. If a field is omitted, that specific condition is ignored (i.e., it matches everything).
Input & Output
| Field | Type | Description |
|---|---|---|
inputs | List<String> | A list of block IDs, namespaces, or tags to replace. Specific: "minecraft:stone"Wildcard: "modid:*"Tags: "#minecraft:logs" |
output | String | The block ID to place instead. Defaults to original block if omitted. |
outputs | List<String> | A list of possible block IDs to randomly choose from. If used, the replacement will be randomly selected from this list. |
remove | Boolean | If true, the block is explicitly replaced with Air. Overrides output. |
keep_states | Boolean | If true, attempts to copy shared properties (rotation, waterlogging, etc.) to the new block. Default: true. See State Retention for details. |
Output Customization
You can further control the properties of the placed block using these fields.
| Field | Type | Description |
|---|---|---|
output_nbt | String | A JSON string representing NBT data to apply to the output block (e.g., "{SpawnData:{entity:{id:\"minecraft:zombie\"}}}"). |
output_state_properties | Map<String, String> | Force specific properties on the output block (e.g., {"axis": "y"}). Overrides keep_states. |
randomize_properties | List<String> | A list of properties to randomize (e.g., ["facing", "rotation"]). Deterministic based on position. |
item_replacements | List<Object> | A list of rules to selectively replace individual items inside a block entity's NBT arrays (like chests). |
Item Replacements Properties
When using the item_replacements array, each rule object accepts the following properties to surgically swap items inside NBT lists:
| Property | Type | Description |
|---|---|---|
list_name | String | The NBT key of the list to iterate over. Defaults to "Items". Supports dot-notation for nested lists (e.g., "Inventory.Items"). |
match_id | String | The registry ID of the item you want to find and replace (e.g., "minecraft:wooden_sword"). |
replace_id | String | The new item registry ID to replace the matched item with. |
replace_nbt | String | (Optional) A stringified NBT compound to merge directly into the new item's tag property. |
probability | Float | (Optional) A number between 0.0 and 1.0 representing the independent chance for this specific item replacement to occur. Great for loot randomization! |
Multi-Block Structures
Use the additional_blocks field to place or remove secondary blocks at specific offsets relative to the main block.
| Field | Type | Description |
|---|---|---|
additional_blocks | List<Object> | A list of offset block definitions to apply alongside the main replacement. |
Additional Block Object properties:
output/outputs: The block ID(s) to place at the offset.remove: Boolean. Iftrue, explicitly sets the offset block to Air.x_offset,y_offset,z_offset: Integers representing the coordinate offset relative to the original block (Default0).output_nbt: A JSON string representing NBT data to apply to this offset block.output_state_properties: A Map to force specific properties on this offset block.randomize_properties: A List of properties to randomize for this offset block.
World Conditions
| Field | Type | Description |
|---|---|---|
biomes / biome | List<String> / String | List or single ID of biomes where this rule applies. |
dimensions / dimension | List<String> / String | List or single ID of dimensions (e.g., minecraft:overworld). |
structures / structure | List<String> / String | List or single ID of structures. The rule only runs if the block is inside one of these structures. |
features / feature | List<String> / String | List or single ID of worldgen feature IDs, tags, or tree types (e.g., minecraft:oak, minecraft:ore_diamond_buried, #c:ores). Only applies during initial world generation. |
structure_radius | Integer | Optional block radius around structure bounding boxes / pieces (Default 0). |
biome_radius | Integer | Optional block radius around matching biomes (Default 0). |
feature_radius | Integer | Optional block radius around feature origin / placement bounds (Default 0). |
radius | Integer | General fallback block radius for structures, biomes, and features if specific radius is omitted. |
Note: Large radius checks can have a hit on worldgen performance.
Coordinates
Coordinate fields accept simple numbers or relative text.
| Field | Description |
|---|---|
min_x, max_x | Bounds on the X axis. |
min_y, max_y | Bounds on the Y axis. |
min_z, max_z | Bounds on the Z axis. |
Coordinate Syntax:
"64": Absolute coordinate."spawn": The world spawn coordinate."spawn+100": 100 blocks positive from spawn."spawn-50": 50 blocks negative from spawn.
Advanced Logic
| Field | Type | Default | Description |
|---|---|---|---|
probability | Float | 1.0 | A number between 0.0 and 1.0 representing the chance for the replacement to occur (e.g., 0.5 = 50%). |
retrogen | Boolean | true | If true, this rule runs on already generated chunks when they are loaded. |
player_blocks | Boolean | true | If true, this rule applies instantly when a player places a block. |
keep_nbt | Boolean | true | If true, this rule retains block NBT when swapping (chest loot, inventories, etc). |
not | Object | null | An object containing conditions to exclude. If the not conditions match, the rule is skipped. |
State Filters
Use the state_properties field to only replace blocks that match specific states (properties).
"state_properties": {"half": "upper","lit": "true"}
- The key is the property name (e.g.,
facing,age,layers). - The value is the required state as a string.
Neighbor Filters
Use the neighbors field to only replace blocks if their neighbors match specific block conditions.
"neighbors": {"up": "minecraft:air","sides": ["#minecraft:logs", "minecraft:stone"],"down": "#minecraft:dirt"}
- Keys (Directions & Direction Keywords):
- Specific Directions:
up(ortop),down(orbottom),north,south,east,west. any: Matches if at least one of the 6 neighboring blocks satisfies the condition.all: Matches only if all 6 neighboring blocks satisfy the condition.sidesorhorizontal: Matches if at least one horizontal neighbor (north, south, east, west) satisfies the condition.all_sidesorall_horizontal: Matches only if all 4 horizontal neighbors satisfy the condition.
- Specific Directions:
- Values (Block Matching):
- Single Block ID:
"minecraft:air" - Block List / Array:
["minecraft:air", "minecraft:cave_air"](matches if neighbor is any block in the list) - Block Tags: Prefix with
#(e.g.,"#minecraft:logs","#c:stones") - Wildcards & Patterns: Supports wildcard namespaces (e.g.,
"modid:*"or regex pattern matching).
- Single Block ID:
State Retention
When keep_states is set to true (default), the mod attempts to be smart about how it places the new block by copying the block state (properties) from the original block.
How it works:
The mod looks for properties that exist on both the original block and the replacement block.
- If both blocks share a property definition (e.g.,
facing,waterlogged,power,lit), the value is copied over. - If a property exists on the original but not the replacement (or vice versa), it is simply ignored.
Examples:
- Perfect Match (Stair -> Stair): You replace
oak_stairswithstone_stairs. Both blocks havefacing,half,shape, andwaterlogged. The new stairs will face the exact same way and connect exactly like the old ones. - Partial Match (Chest -> Furnace): You replace a
chestwith afurnace. Both blocks have thefacingproperty. The furnace will face the same direction as the chest. However, the chest'stypeproperty (left/right/single) is ignored because furnaces don't have it. - No Match (Log -> Furnace): You replace an
oak_logwith afurnace. Logs use theaxisproperty (x, y, z) for rotation. Furnaces use thefacingproperty (north, south, east, west). Since these properties are different, the furnace will spawn with its default rotation.