Modify Block State (Block Action Type)
Changes one block state property of the block. Each kind of property takes a different field: boolean properties use value, enum properties use enum, and integer properties use operation and change.
Type ID: apoli:modify_block_state
note
If none of the fields the property expects are set, the action does nothing.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
property | String | required | The name of the property to change, such as facing or age. |
operation | String | "add" | How change is applied to an integer property: "add" or "set". |
change | Integer | optional | For an integer property, the value to add, subtract or set. |
value | Boolean | optional | For a boolean property, the new value. |
enum | String | optional | For an enum property, the new value. |
cycle | Boolean | false | With true, moves the property to its next value in the cycle and ignores the other optional fields. It works on every kind of property. |
Examples
"block_action": {
"type": "apoli:modify_block_state",
"property": "facing",
"cycle": true
}This cycles through the values of the facing property, if the block has one.