Test Damage Type Operation
Converts minecraft:damage_type
prototype into puffish_skills:boolean
prototype whether the condition matches given block.
Examples
The operation is used to test damage type, such that the experience source gives the player exactly 5 experience every time the player kills entity with projectile damage type.
Click to view
json
{
"type": "puffish_skills:kill_entity",
"data": {
"variables": {
"exp_value": {
"operations": [
{
"type": "get_damage_source",
},
{
"type": "get_type",
},
{
"type": "puffish_skills:test",
"data": {
"damage_type": "#is_projectile"
}
},
{
"type": "switch",
"data": {
"true": 5,
"false": 0
}
}
]
}
},
"experience": "exp_value"
}
}
JSON structure
Property | Type | Required |
---|---|---|
damage_type | damage identifier or damage tag | yes |