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