Skip to main content

Craft Item

The arc:on_craft_item action type is triggered when a player crafts an item.

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:item_stackRepresents a stack of items, including item type and quantity.
arc:worldRefers to the world/dimension where the action occurs.
arc:recipeDefines a crafting or smelting recipe used in an action.

Example

The following example will give the player a regeneration effect for 5 seconds every time they craft a diamond sword.

data/my_datapack/arc/regeneration_for_crafting_diamond_sword.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_craft_item",
"conditions": [
{
"type": "arc:item",
"item": {
"id": "minecraft:diamond_sword"
}
}
],
"rewards": [
{
"type": "arc:effect",
"effect": "minecraft:regeneration",
"duration": 100,
"amplifier": 0
}
]
}

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: