Toggle
A custom version of Apoli's Toggle (Power Type)
Type ID: ccpacks:toggle
Fields
| Field | Type | Default | Description |
|---|---|---|---|
active_by_default |
Boolean | true |
Whether this power starts in the on or off state. |
key |
Key | {"key": "none"} |
Which active key this power should respond to. |
retain_state |
Boolean | true |
Whether this power switches back to default if the condition is no longer met. |
toggle_on_action |
Entity Action Type | optional | The entity action to be executed when the power is toggled on. |
toggle_off_action |
Entity Action Type | optional | The entity action to be executed when the power is toggled off. |
Example
{
"type": "ccpacks:toggle",
"active_by_default": false,
"key": {
"key": "key.use"
}
}
This example will provide a switch that is not active by default, and can be toggled with the key.use keybind.