Block State
Checks a block state property of the block.
Type ID: origins:block_state
Fields:
| Field | Type | Default | Description |
|---|---|---|---|
property |
String | The name of the property that should be checked. Examples are facing or age. See: Block States (MC Wiki) |
|
comparison |
Comparison | optional | If the property contains an integer value, this is the comparison the will be used to compare the property's value to the specified compare_to integer. |
compare_to |
Integer | optional | If the property contains an integer value, this is the value the property's value will be compared to. |
value |
Boolean | optional | If the property contains a boolean value, this is the value the property needs to be to pass the check. |
enum |
String | optional | If the property contains different string values, this is the string value the property needs to be to pass the check. |
Example:
"block_condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins:block",
"block": "minecraft:chest"
},
{
"type": "origins:block_state",
"property": "facing",
"enum": "north"
}
]
}
This example checks if a chest block is facing north.