Skip to content

Test Item Stack Operation

Converts minecraft:item_stack prototype into puffish_skills:boolean prototype whether the condition matches given item stack.

Examples

The operation is used to test item stack 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": "puffish_skills:test",
						"data": {
							"item": "golden_pickaxe"
						}
					},
					{
						"type": "switch",
						"data": {
							"true": 5,
							"false": 0
						}
					}
				]
			}
		},
		"experience": "exp_value"
	}
}

JSON structure

PropertyTypeRequired
itemitem identifier or item tagno
nbtitem nbtno