Skip to main content

Blocks

The arc:blocks condition type checks if a block is one of several specified blocks or belongs to a specified block tag.

Parameters

ParameterTypeRequiredDefaultDescription
blocksstring[]Required-The blocks/block tags to check.

Example

The following example rewards the player with a diamond when they break any block that is part of the #minecraft:logs tag.

data/my_datapack/arc/diamond_for_logs.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_break_block",
"conditions": [
{
"type": "arc:blocks",
"blocks": ["#minecraft:logs"]
}
],
"rewards": [
{
"type": "arc:item",
"item": { "id": "minecraft:diamond" }
}
]
}

Compatible Action Types