{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:snow_golem",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          { "particle": "query.is_stunned" }
        ]
      },
      "animations": {
        "particle": "controller.animation.chemical_mutating"
      }
    },

    "component_groups": {
      "mutant_explode": {
        "minecraft:explode": {
          "fuse_length": 1.5,
          "fuse_lit": true,
          "power": 1,
          "causes_fire": true,
          "destroy_affected_by_griefing": true
        }
      },

      "mutant_transform": {
    
        "minecraft:movement": {
          "value": 0.1
        },
        "minecraft:behavior.knockback_roar": {
          "priority": 1,
          "duration": 0.1,
          "attack_time": 0.1,
          "knockback_damage": 1,
          "knockback_strength": 3,
          "knockback_range": 10,
          "cooldown_time": 30,
          "knockback_filters": {
        "all_of": [
          { "test": "is_family", "subject": "other", "operator": "!=", "value": "chemical_x" }
        ]
          },
        
          "damage_filters": {
        "all_of": [
          { "test": "is_family", "subject": "other", "value": "player" }
        ]
          }
        },
        "minecraft:transformation": {
         
          "transformation_sound": "remedy",
          "into": "mutant:mutant_snow_golem",
          "delay": 0.2
        }
      },
      "mutation": {
        "minecraft:is_stunned": {
        },
        "minecraft:damage_sensor": {
          "triggers": {
            "on_damage": {
              "filters": { "test" :  "is_family", "subject" : "other", "value" :  "chemical_x"}
            },
            "deals_damage": true
          }
        },
        "minecraft:spell_effects": {

          "add_effects": [
            {
              "effect": "fire_resistance",
              "amplifier": 4,
              "visible": true,
              "ambient": false,
              "duration": 20
            },
            {
              "effect": "wither",
              "amplifier": 1,
              "visible": true,
              "ambient": false,
              "duration": 20
            },
            {
              "effect": "regeneration",
              "amplifier": 4,
              "visible": false,
              "ambient": false,
              "duration": 20
            }
 
          ]
        },
        "minecraft:transformation": {
          "into": "",
          "begin_transform_sound": "remedy",
          "transformation_sound": "unfect",
          "keep_level": true,
          "delay": 30
        },
     
        "minecraft:is_shaking": {
        },

        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [ 8.0, 15.0 ],
          "attack_cooldown_complete_event": {
            "event": "mutate",
            "target": "self"
          }
        },
        "minecraft:mark_variant": {
          "value": 3
        }
   
      
       
      },
      "minecraft:snowman_sheared": {
        "minecraft:is_sheared": {
        }
      }      
    },

    "components": {
      "minecraft:type_family": {
        "family": [ "snowgolem", "mob" ]
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:nameable": {
      },
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 1.8
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/snowman.json"
      },
      "minecraft:health": {
        "value": 4,
        "max": 4
      },
      "minecraft:movement": {
        "value": 0.2
      },
      "minecraft:navigation.walk": {
        "avoid_water": true
      },
      "minecraft:movement.basic": {
      },
      "minecraft:jump.static": {
      },
      "minecraft:can_climb": {
      },
      "minecraft:attack": {
        "damage": 2
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": false
          },
          {
            "on_damage": {
              "filters": { "test" :  "is_family", "subject" : "other", "value" :  "chemical_x"},
              "event": "become_mutated"
            },
           "deals_damage": true
          }
        ]
      },
    
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
            "cause": "lava",
            "damage_per_tick": 4
          },
          {
            "filters": { "test": "is_temperature_value", "operator": ">", "value": 1.0 },
            "cause": "temperature",
            "damage_per_tick": 1
          },
          {
            "filters": { "test": "in_water_or_rain", "operator": "==", "value": true },
            "cause": "drowning",
            "damage_per_tick": 1
          }
        ]
      },
      "minecraft:interact": {
        "interactions": [
          {
            "cooldown": 2.5,
            "use_item": false,
            "hurt_item": 1,
            "play_sounds": "shear",
            "interact_text": "action.interact.shear",
            "on_interact": {
              "filters": {
                "all_of": [
                  { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "shears"},
                  { "test": "is_family", "subject": "other", "value": "player"},
                  { "test": "has_component", "operator": "!=", "value": "minecraft:is_sheared"}
                ]
              },
              "event": "minecraft:on_sheared",
              "target": "self"
            }
          }
        ]
      },
      "minecraft:leashable": {
        "soft_distance": 4.0,
        "hard_distance": 6.0,
        "max_distance": 10.0
      },
      "minecraft:balloonable": {
      },
      "minecraft:behavior.ranged_attack": {
        "priority": 1,
        "speed_multiplier": 1.25,
        "attack_interval": 1,
        "attack_radius": 10
      },
      "minecraft:shooter": {
        "def": "minecraft:snowball"
      },
      "minecraft:trail": {
        "block_type": "minecraft:snow_layer",
        "spawn_filter": { "test": "is_temperature_value", "operator": "<", "value": 0.81 }
      },
      "minecraft:behavior.random_stroll": {
        "priority": 2,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 3,
        "look_distance": 6.0
      },
      "minecraft:behavior.random_look_around": {
        "priority": 4
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 1,
        "entity_types": [
          {
            "filters": { "test" :  "is_family", "subject" : "other", "value" :  "monster"},
            "within_default": 6
          }
        ],
        "must_reach": true
      },
      "minecraft:persistent": {
      },
      "minecraft:physics": {
      },
      
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },

    "events": {
      "become_mutated": {
        "add": {
          "component_groups": [
            "mutation"
          ]
        }
      },

      "mutate": {
        "randomize": [
          {
            "weight": 15,
            "remove": {
            },
            "add": {
              "component_groups": [
                "mutant_transform"
              ]

            }
          },


          {
            "weight": 10,
            "remove": {
            },
            "add": {
              "component_groups": [
                "mutant_explode"
              ]
            }
          }
        ]
      },
      "minecraft:on_sheared": {
        "remove": {
        },
        "add": {
          "component_groups": [
            "minecraft:snowman_sheared"
          ]
        }
      }
    }
  }
}