Item
The arc:item reward type gives an item directly to the player's inventory.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
item | Item | ✅Required | -No default value | The item to give. |
amount | int | ❌Optional | 1 | The amount of the item to give. |
Example
The following example will give the player an apple every time they break a dirt block.
data/my_datapack/arc/apple_from_dirt.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_break_block",
"conditions": [
{
"type": "arc:block",
"block": "minecraft:dirt"
}
],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:apple"
}
}
]
}
## Compatible Action Types
<CompatibleActionTypes />