{
   "format_version":"1.21.0",
   "minecraft:entity":{
      "description":{
         "identifier":"minecraft:cow",
         "spawn_category":"creature",
         "is_spawnable":true,
         "is_summonable":true
      },
      "component_groups":{
         "minecraft:cow_baby":{
            "minecraft:type_family":{
               "family":[
                  "cow",
                  "mob",
                  "immune"
               ]
            },
            "minecraft:is_baby":{
               
            },
            "minecraft:scale":{
               "value":0.5
            },
            "minecraft:ageable":{
               "duration":1200,
               "feed_items":"wheat",
               "grow_up":{
                  "event":"minecraft:ageable_grow_up",
                  "target":"self"
               }
            },
            "minecraft:behavior.follow_parent":{
               "priority":6,
               "speed_multiplier":1.1
            }
         },
         "true:cow_adult_immune":{
            "minecraft:type_family":{
               "family":[
                  "cow",
                  "mob",
                  "immune"
               ]
            },
            "minecraft:experience_reward":{
               "on_bred":"Math.Random(1,7)"
            },
            "minecraft:behavior.breed":{
               "priority":3,
               "speed_multiplier":1.0
            },
            "minecraft:breedable":{
               "require_tame":false,
               "breed_items":"wheat",
               "breeds_with":{
                  "mate_type":"minecraft:cow",
                  "baby_type":"minecraft:cow",
                  "breed_event":{
                     "event":"minecraft:entity_born",
                     "target":"baby"
                  }
               }
            },
            "minecraft:damage_sensor":{
               "triggers":[
                  {
                     "on_damage":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_damage",
                                 "value":"fatal"
                              }
                           ]
                        },
                        "event":"true:to_dead_immune"
                     }
                  }
               ]
            },
            "minecraft:interact":{
               "interactions":[
                  {
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"is_family",
                                 "subject":"other",
                                 "value":"player"
                              },
                              {
                                 "test":"has_equipment",
                                 "domain":"hand",
                                 "subject":"other",
                                 "value":"bucket:0"
                              }
                           ]
                        }
                     },
                     "use_item":true,
                     "transform_to_item":"bucket:1",
                     "play_sounds":"milk",
                     "interact_text":"action.interact.milk"
                  }
               ]
            }
         },
         "minecraft:cow_adult":{
            "minecraft:type_family":{
               "family":[
                  "cow",
                  "mob",
                  "animal"
               ]
            },
            "minecraft:experience_reward":{
               "on_bred":"Math.Random(1,7)"
            },
            "minecraft:damage_sensor":{
               "triggers":[
                  {
                     "on_damage":{
                        "filters":{
                           "any_of":[
                              {
                                 "test":"is_family",
                                 "subject":"other",
                                 "value":"apocalypse"
                              }
                           ],
                           "all_of":[
                              {
                                 "test":"has_damage",
                                 "value":"fatal"
                              }
                           ]
                        },
                        "event":"true:to_zombie"
                     }
                  },
                  {
                     "on_damage":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_damage",
                                 "value":"fatal"
                              }
                           ]
                        },
                        "event":"true:to_dead_contaminated"
                     }
                  }
               ]
            },
            "minecraft:interact":{
               "interactions":[
                  {
                     "on_interact":{
                        "filters":{
                           "all_of":[
                              {
                                 "test":"has_equipment",
                                 "subject":"other",
                                 "domain":"hand",
                                 "value":"true:zombie_vaccine"
                              }
                           ]
                        },
                        "event":"true:to_vaccinate",
                        "target":"self"
                     },
                     "use_item":true,
                     "interact_text":"action.interact.vaccinate"
                  }
               ]
            }
         },
         "true:zombie":{
            "minecraft:transformation":{
               "into":"true:zombie_cow<true:to_default>"
            }
         },
         "true:dead_contaminated":{
            "minecraft:transformation":{
               "into":"true:cow_corpse<true:to_contaminated>"
            }
         },
         "true:dead_immune":{
            "minecraft:transformation":{
               "into":"true:cow_corpse<true:to_immune>"
            }
         }
      },
      "components":{
         "minecraft:is_hidden_when_invisible":{
            
         },
         "minecraft:breathable":{
            "total_supply":15,
            "suffocate_time":0
         },
         "minecraft:navigation.walk":{
            "can_path_over_water":true,
            "avoid_water":true,
            "avoid_damage_blocks":true
         },
         "minecraft:movement.basic":{
            
         },
         "minecraft:jump.static":{
            
         },
         "minecraft:can_climb":{
            
         },
         "minecraft:collision_box":{
            "width":0.9,
            "height":1.3
         },
         "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:movement":{
            "value":0.25
         },
         "minecraft:despawn":{
            "despawn_from_distance":{
               
            }
         },
         "minecraft:behavior.float":{
            "priority":0
         },
         "minecraft:behavior.panic":{
            "priority":1,
            "speed_multiplier":1.25
         },
         "minecraft:behavior.mount_pathing":{
            "priority":2,
            "speed_multiplier":1.5,
            "target_dist":0.0,
            "track_target":true
         },
         "minecraft:behavior.breed":{
            "priority":3,
            "speed_multiplier":1.0
         },
         "minecraft:behavior.tempt":{
            "priority":4,
            "speed_multiplier":1.25,
            "items":[
               "wheat"
            ]
         },
         "minecraft:behavior.follow_parent":{
            "priority":5,
            "speed_multiplier":1.1
         },
         "minecraft:behavior.random_stroll":{
            "priority":6,
            "speed_multiplier":0.8
         },
         "minecraft:behavior.look_at_player":{
            "priority":7,
            "look_distance":6.0,
            "probability":0.02
         },
         "minecraft:behavior.random_look_around":{
            "priority":9
         },
         "minecraft:leashable":{
            "soft_distance":4.0,
            "hard_distance":6.0,
            "max_distance":10.0
         },
         "minecraft:balloonable":{
            
         },
         "minecraft:physics":{
            
         },
         "minecraft:pushable":{
            "is_pushable":true,
            "is_pushable_by_piston":true
         },
         "minecraft:on_hurt_by_player":{
            "event":"true:hurt",
            "target":"self"
         },
         "minecraft:on_hurt":{
            "event":"true:hurt",
            "target":"self"
         },
         "minecraft:conditional_bandwidth_optimization":{
            
         }
      },
      "events":{
         "minecraft:entity_spawned":{
            "add":{
               "component_groups":[
                  "minecraft:cow_adult"
               ]
            }
         },
         "minecraft:entity_born":{
            "add":{
               "component_groups":[
                  "minecraft:cow_baby"
               ]
            }
         },
         "minecraft:entity_transformed":{
            "add":{
               "component_groups":[
                  "minecraft:cow_adult"
               ]
            }
         },
         "minecraft:ageable_grow_up":{
            "remove":{
               "component_groups":[
                  "minecraft:cow_baby"
               ]
            },
            "add":{
               "component_groups":[
                  "true:cow_adult_immune"
               ]
            }
         },
         "minecraft:spawn_adult":{
            "add":{
               "component_groups":[
                  "minecraft:cow_adult"
               ]
            }
         },
         "true:to_vaccinate":{
            "remove":{
               "component_groups":[
                  "minecraft:cow_adult"
               ]
            },
            "add":{
               "component_groups":[
                  "true:cow_adult_immune"
               ]
            },
            "queue_command":{
               "command":[
                  "particle true:vaccine ^ ^0.7 ^",
                  "playsound vaccine @a [r=6] ~ ~ ~"
               ]
            }
         },
         "true:to_zombie":{
            "add":{
               "component_groups":[
                  "true:zombie"
               ]
            }
         },
         "true:to_dead_contaminated":{
            "add":{
               "component_groups":[
                  "true:dead_contaminated"
               ]
            },
            "queue_command":{
               "command":[
                  "particle true:blood_splatter ^ ^1 ^",
                  "particle true:blood_splatter ^ ^2 ^"
               ]
            }
         },
         "true:to_dead_immune":{
            "add":{
               "component_groups":[
                  "true:dead_immune"
               ]
            },
            "queue_command":{
               "command":[
                  "particle true:blood_splatter ^ ^1 ^",
                  "particle true:blood_splatter ^ ^2 ^"
               ]
            }
         },
         "true:hurt":{
            "queue_command":{
               "command":[
                  "particle true:blood_splatter ^ ^1 ^",
                  "particle true:blood_splatter ^ ^2 ^"
               ]
            }
         }
      }
   }
}