Skip to content

Test Block Operation

Converts minecraft:block prototype into puffish_skills:boolean prototype whether the condition matches given block.

Examples

The operation is used to test block kind, such that the experience source gives the player exactly 5 experience every time the player mines stone block.

Click to view
json
{
	"type": "puffish_skills:mine_block",
	"data": {
		"variables": {
			"exp_value": {
				"operations": [
					{
						"type": "get_mined_block_state"
					},
					{ 
						"type": "puffish_skills:test",
						"data": {
							"block": "stone"
						}
					},
					{
						"type": "switch",
						"data": {
							"true": 5,
							"false": 0
						}
					}
				]
			}
		},
		"experience": "exp_value"
	}
}

JSON structure

PropertyTypeRequired
blockblock identifier or block tagno
stateblock stateno