Skip to main content

Block

The arc:block condition type checks if the block involved in an action matches a specific block type.

Parameters

ParameterTypeRequiredDefaultDescription
blockBlockRequired-The block to check.

Example

The following example rewards the player with an apple when they place a dirt block.

data/my_datapack/arc/apple_for_dirt.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_place_block",
"conditions": [
{
"type": "arc:block",
"block": "minecraft:dirt"
}
],
"rewards": [
{
"type": "arc:item",
"item": { "id": "minecraft:apple" }
}
]
}

Compatible Action Types