Skip to main content

Place Block

The arc:on_place_block action type is triggered when a player places a block.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:block_stateRepresents the state of a block, including its type and properties.
arc:block_positionSpecifies the coordinates (x, y, z) of a block in the world.
arc:worldRefers to the world/dimension where the action occurs.

Example

The following example will give the player a diamond every time they place a stone block.

data/my_datapack/arc/diamond_for_placing_stone.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_place_block",
"conditions": [
{
"type": "arc:block",
"block": "minecraft:stone"
}
],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:diamond"
}
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: