Block State ‐ Custom Data - DerFrZocker/Custom-Ore-Generator GitHub Wiki
Block State Custom Data
The BLOCK_STATE
custom data allows you to set specific properties for a generated block, such as its orientation, whether it's lit, or other block-specific attributes. This is useful for blocks that have multiple visual or functional states.
- Name:
BLOCK_STATE
- Type: String
- Applicable Materials: Any block that supports block states (e.g., stairs, doors, fences, redstone lamps, furnaces).
Usage
To set the BLOCK_STATE
custom data, you provide a string that represents the desired block state. The format of this string is typically property=value
, and multiple properties can be separated by commas (e.g., facing=north,half=top
).
Important: The exact block state properties and their valid values depend on the specific Minecraft block. You can often find these by looking up the block's data values on Minecraft wikis or by using in-game debug tools.
Example
To generate a furnace that is lit and facing north:
/oregen set customdata my_lit_furnace BLOCK_STATE "facing=north,lit=true"
To generate oak stairs that are upside down and facing east:
/oregen set customdata my_upside_down_stairs BLOCK_STATE "facing=east,half=top,shape=straight"