Block State

Block Condition Type

Checks a block state property of the block.

Type ID: origins:block_state

Note

If none of the expected fields are specified, this condition will just check if the block has the specified property.

Fields

Field Type Default Description
property String The name of the property that will be checked. Examples are facing or age. See: Minecraft Wiki: Block States (List of block states)
comparison Comparison optional If specified and if the property uses an integer, determines how the integer value of the specified property should be compared to the specified value. Only used if the specified property has an integer value.
compare_to Integer optional If specified, the itneger at which the integer value of the specified property will be compared to. Only used if the specified property has an integer value.
value Boolean optional If specified, the boolean to compare to the boolean value of the specified property. Only used if the specified property has a boolean value.
enum String optional If specified, the string at which the string value of the specified property will be compared to. Only used if the specified property has a string value.

Examples

"block_condition": {
    "type": "origins:and",
    "conditions": [
        {
            "type": "origins:block",
            "block": "minecraft:chest"
        },
        {
            "type": "origins:block_state",
            "property": "facing",
            "enum": "north"
        }
    ]
}

This example will check if a Chest block is facing north.

"block_condition": {
    "type": "origins:block_state",
    "property": "age"
}

This example will check if the specified block has the age Block State property.