{ "format_version": "1.18.10", "minecraft:entity": { "description": { "identifier": "minecraft:pig", "is_spawnable": true, "is_summonable": true, "is_experimental": false, "animations": { "ctrl_damage": "controller.animation.pig_on_damage" }, "scripts": { "animate": [ "ctrl_damage" ] } }, "component_groups": { "is_charged": { "minecraft:is_charged": {} } }, "components": { "minecraft:is_hidden_when_invisible": { }, "minecraft:damage_sensor": { "triggers": [ { "on_damage": { //Fires event on itself "filters": { "test": "is_family", "subject": "other", "value": "player" }, "event": "bug:workaround", "target": "self" } } ] }, "minecraft:type_family": { "family": [ "pig", "mob" ] }, "minecraft:breathable": { "total_supply": 15, "suffocate_time": 0 }, "minecraft:nameable": { }, "minecraft:health": { "value": 10, "max": 10 }, "minecraft:hurt_on_condition": { "damage_conditions": [ { "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true }, "cause": "lava", "damage_per_tick": 4 } ] }, "minecraft:collision_box": { "width": 0.9, "height": 0.9 }, "minecraft:leashable": { "soft_distance": 4.0, "hard_distance": 6.0, "max_distance": 10.0 }, "minecraft:balloonable": { "mass": 0.9 }, "minecraft:despawn": { "despawn_from_distance": {} }, "minecraft:physics": { }, "minecraft:pushable": { "is_pushable": true, "is_pushable_by_piston": true }, "minecraft:conditional_bandwidth_optimization": { } }, "events": { "bug:workaround": { "sequence":[ { "trigger": "bug:on_damage" }, { "trigger":{ "event": "bug:on_attack", "target": "other" } } ] }, "bug:on_damage": { "add": { "component_groups": [ "is_charged" ] } }, "bug:reset_controller": { "remove": { "component_groups": [ "is_charged" ] } } } } }