Test Item Operation
Converts minecraft:item
prototype into puffish_skills:boolean
prototype whether the condition matches given item.
Examples
The operation is used to test item kind, such that the experience source gives the player exactly 5 experience every time the player mines a block using golden pickaxe.
Click to view
json
{
"type": "puffish_skills:mine_block",
"data": {
"variables": {
"exp_value": {
"operations": [
{
"type": "get_tool_item_stack"
},
{
"type": "get_item"
},
{
"type": "puffish_skills:test",
"data": {
"item": "golden_pickaxe"
}
},
{
"type": "switch",
"data": {
"true": 5,
"false": 0
}
}
]
}
},
"experience": "exp_value"
}
}
JSON structure
Property | Type | Required |
---|---|---|
item | item identifier or item tag | no |