Skip to content

Test Stat Operation

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

Examples

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

Click to view
json
{
	"type": "puffish_skills:mine_block",
	"data": {
		"variables": {
			"exp_value": {
				"operations": [
					{
						"type": "get_stat"
					},
					{ 
						"type": "puffish_skills:test",
						"data": {
							"stat": "minecraft.custom:minecraft.jump"
						}
					},
					{
						"type": "switch",
						"data": {
							"true": 5,
							"false": 0
						}
					}
				]
			}
		},
		"experience": "exp_value"
	}
}

JSON structure

PropertyTypeRequired
statstat identifierno