{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:goat",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "goat_baby": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        },
        "minecraft:behavior.follow_parent": {
          "priority": 6,
          "speed_multiplier": 1
        },
        "minecraft:ageable": {
          "duration": 1200,
          "feed_items": "wheat",
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:attack": {
          "damage": 1
        }
      },
      "goat_adult": {
        "minecraft:experience_reward": {
          "on_bred": "Math.Random(1,7)",
          "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/goat.json"
        },
        "minecraft:behavior.breed": {
          "priority": 3,
          "speed_multiplier": 0.6
        },
        "minecraft:breedable": {
          "require_tame": false,
          "breed_items": "wheat",
          "breeds_with": {
            "mate_type": "minecraft:goat",
            "baby_type": "minecraft:goat",
            "breed_event": {
              "event": "minecraft:entity_born",
              "target": "baby"
            }
          },
          "mutation_factor": {
            "variant": 0
          }
        },
        "minecraft:attack": {
          "damage": 2
        }
      },
      "goat_default": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "goat_screamer": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "interact_default": {
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "has_component",
                      "subject": "self",
                      "operator": "!=",
                      "value": "minecraft:is_baby"
                    },
                    {
                      "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_suspiciously",
              "interact_text": "action.interact.milk"
            }
          ]
        }
      },
      "interact_screamer": {
        "minecraft:interact": {
          "interactions": [
            {
              "on_interact": {
                "filters": {
                  "all_of": [
                    {
                      "test": "has_component",
                      "subject": "self",
                      "operator": "!=",
                      "value": "minecraft:is_baby"
                    },
                    {
                      "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.screamer",
              "interact_text": "action.interact.milk"
            }
          ]
        }
      },
      "ram_default": {
        "minecraft:behavior.ram_attack": {
          "priority": 5,
          "run_speed": 0.7,
          "ram_speed": 1.8,
          "min_ram_distance": 4,
          "ram_distance": 7,
          "knockback_force": 2.5,
          "knockback_height": 0.04,
          "pre_ram_sound": "pre_ram",
          "ram_impact_sound": "ram_impact",
          "cooldown_range": [
            30,
            300
          ],
          "on_start": [
            {
              "event": "start_event",
              "target": "self"
            }
          ]
        }
      },
      "ram_screamer": {
        "minecraft:behavior.ram_attack": {
          "priority": 5,
          "run_speed": 0.7,
          "ram_speed": 1.8,
          "min_ram_distance": 4,
          "ram_distance": 7,
          "knockback_force": 2.5,
          "knockback_height": 0.04,
          "pre_ram_sound": "pre_ram.screamer",
          "ram_impact_sound": "ram_impact.screamer",
          "cooldown_range": [
            5,
            15
          ],
          "on_start": [
            {
              "event": "start_event",
              "target": "self"
            }
          ]
        }
      },
      "attack_cooldown": {
        "minecraft:attack_cooldown": {
          "attack_cooldown_time": [
            30,
            40
          ],
          "attack_cooldown_complete_event": {
            "event": "attack_cooldown_complete_event",
            "target": "self"
          }
        }
      }
    },
    "components": {
      "minecraft:is_hidden_when_invisible": {
      },
      "minecraft:behavior.jump_to_block": {
        "priority": 8,
        "search_width": 10,
        "search_height": 10,
        "minimum_path_length": 8,
        "minimum_distance": 1,
        "scale_factor": 0.6,
        "cooldown_range": [
          30,
          60
        ]
      },
      "minecraft:genetics": {
        "mutation_rate": 0.02,
        "genes": [
          {
            "name": "goat_variant",
            "use_simplified_breeding": true,
            "allele_range": {
              "range_min": 1,
              "range_max": 100
            },
            "genetic_variants": [
              {
                "main_allele": {
                  "range_min": 1,
                  "range_max": 2
                },
                "birth_event": {
                  "event": "minecraft:born_screamer",
                  "target": "self"
                }
              },
              {
                "main_allele": {
                  "range_min": 3,
                  "range_max": 100
                },
                "birth_event": {
                  "event": "minecraft:born_default",
                  "target": "self"
                }
              }
            ]
          }
        ]
      },
      "minecraft:type_family": {
        "family": [
          "goat",
          "animal"
        ]
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:navigation.walk": {
        "can_path_over_water": true,
        "avoid_water": true,
        "avoid_damage_blocks": true,
        "blocks_to_avoid": [
          {
            "name": "minecraft:powder_snow"
          }
        ]
      },
      "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.4
      },
      "minecraft:despawn": {
        "despawn_from_distance": {}
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "speed_multiplier": 1
      },
      "minecraft:behavior.tempt": {
        "priority": 4,
        "speed_multiplier": 0.75,
        "items": [
          "wheat"
        ]
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 6,
        "within_radius": 16,
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "goat"
                },
                {
                  "test": "has_component",
                  "subject": "self",
                  "operator": "!=",
                  "value": "minecraft:attack_cooldown"
                }
              ]
            },
            "max_dist": 16
          }
        ],
        "must_see": true
      },
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "fall",
          "deals_damage": true,
          "damage_modifier": -10
        }
      },
      "minecraft:behavior.random_stroll": {
        "priority": 9,
        "speed_multiplier": 0.6
      },
      "minecraft:behavior.look_at_player": {
        "priority": 10,
        "look_distance": 6,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 11
      },
      "minecraft:leashable": {
        "soft_distance": 4,
        "hard_distance": 6,
        "max_distance": 10
      },
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 95,
            "add": {
              "component_groups": [
                "goat_adult"
              ]
            }
          },
          {
            "weight": 5,
            "add": {
              "component_groups": [
                "goat_baby"
              ]
            }
          }
        ]
      },
      "minecraft:entity_born": {
        "add": {
          "component_groups": [
            "goat_baby"
          ]
        }
      },
      "minecraft:born_default": {
        "add": {
          "component_groups": [
            "goat_default",
            "ram_default",
            "interact_default"
          ]
        }
      },
      "minecraft:born_screamer": {
        "add": {
          "component_groups": [
            "goat_screamer",
            "ram_screamer",
            "interact_screamer"
          ]
        }
      },
      "minecraft:ageable_grow_up": {
        "remove": {
          "component_groups": [
            "goat_baby"
          ]
        },
        "add": {
          "component_groups": [
            "goat_adult"
          ]
        }
      },
      "start_event": {
        "add": {
          "component_groups": [
            "attack_cooldown"
          ]
        }
      },
      "attack_cooldown_complete_event": {
        "remove": {
          "component_groups": [
            "attack_cooldown"
          ]
        }
      }
    }
  }
}