Block Action Types
Block actions perform operations on a block at a specific position.
origins:add_block
Adds a block at the position.
| Field | Type | Default | Description |
|---|---|---|---|
block | Identifier | required | Block ID to add |
Example
"block_action": {
"type": "origins:add_block",
"block": "minecraft:coal_ore"
}
This example will add a Coal Ore block at the position of the block action type.
origins:bonemeal
Applies bonemeal effect to the block.
Example
"block_action": {
"type": "origins:bonemeal",
"effects": false
}
This example will apply bonemeal to the target block of the block action without the visual effects.
origins:destroy
This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.
Destroys the target block.
| Field | Type | Default | Description |
|---|---|---|---|
drop | Boolean | true | Whether the block drops loot |
origins:execute_command
Executes a command at the block position.
| Field | Type | Default | Description |
|---|---|---|---|
command | String | required | Command to execute |
Example
"block_action": {
"type": "origins:execute_command",
"command": "summon minecraft:item ~ ~ ~ {Item:{id:\"minecraft:wheat\",Count:1}}"
}
This example will summon a Wheat item entity at the position of the block action type.
origins:explode
Creates an explosion at the block position.
| Field | Type | Default | Description |
|---|---|---|---|
power | Float | required | Explosion power |
destruction_type | String | break | Block destruction: break, destroy, none |
indestructible | Block Condition | optional | Blocks immune to the explosion |
create_fire | Boolean | false | Whether to create fire |
Example
"block_action": {
"type": "origins:explode",
"power": 5,
"destruction_type": "none",
"create_fire": false
}
This example will summon an explosion at the position of where the block action was invoked that would not destroy the terrain nor spread fire.
origins:light_up
This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.
Sets a block's lit state to true when that state property exists.
| Field | Type | Default | Description |
|---|---|---|---|
| None | - | - | - |
origins:modify_block_state
Modifies the block's state properties.
| Field | Type | Default | Description |
|---|---|---|---|
property | String | required | Block state property name |
value | String | optional | New property value |
operation | String | optional | Operation to perform |
enum_values | List of String | optional | Cycle through values |
cycle | Boolean | true | Whether to cycle through enum values |
Example
"block_action": {
"type": "origins:modify_block_state",
"property": "facing",
"cycle": true
}
This example will cycle through the values of the facing property if available.
origins:schedule_tick
This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.
Schedules a tick for the target block.
| Field | Type | Default | Description |
|---|---|---|---|
delay | Integer | required | Delay before the scheduled tick |
origins:set_block
Sets the block at the position.
| Field | Type | Default | Description |
|---|---|---|---|
block | Identifier | required | Block ID |
Example
"block_action": {
"type": "origins:set_block",
"block": "minecraft:coal_ore"
}
This example will set a Coal Ore block at the position of the block action type.
origins:spawn_entity
Spawns an entity at the block position.
| Field | Type | Default | Description |
|---|---|---|---|
entity_type | Identifier | required | Entity type ID |
tag | NBT | optional | Initial NBT data |
action | Entity Action | optional | Action on the spawned entity |
Example
"entity_action": {
"type": "origins:spawn_entity",
"entity_type": "minecraft:zombie",
"tag": "{NoAI:1b,IsBaby:1,HandItems:[{id:\"minecraft:gold_block\",Count:1},{}]}"
}
This example will spawn a baby Zombie holding a Gold Block that has no AI at the position of the entity.