{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:mossheep",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:sheep_baby": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        },

        "minecraft:ageable": {
          "duration": 1200,
          "feed_items": [
            "nicothekid:mossy_plant"
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up",
            "target": "self"
          }
        },
        "minecraft:behavior.follow_parent": {
          "priority": 4,
          "speed_multiplier": 1.10
        }
      },
      "component:sheep_adult": { 
        "minecraft:scale": {
          "value": 1.0
        },
        
        "minecraft:breedable": {
          "allow_sitting": false,
          "causes_pregnancy": false,
          "inherit_tamed": false,
          "require_full_health": true,
          "require_tame": false,
          "extra_baby_chance": 0,
          "breed_cooldown": 60,
          "breed_items": [
            "nicothekid:mossy_plant"
          ],
          "breeds_with": {
            "mate_type": "nicothekid:mossheep",
            "baby_type": "nicothekid:mossheep",
            "breed_event": {
              "event": "minecraft:entity_born",
              "target": "baby"
            }
          }
        },
        "minecraft:behavior.breed": {
          "priority": 3,
          "speed_multiplier": 1.0
        },
        "minecraft:experience_reward": {
          "on_bred": "Math.Random(1,7)",
          "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
        }
      },
      "component:sheep_sheared": {
        "minecraft:is_sheared": {}
      },
      
      "component:rideable_wooly": {
        "minecraft:rideable": {
          "controlling_seat": 0,
          "seat_count": 1,
          "crouching_skip_interact": true,
          "pull_in_entities": false,
          "rider_can_interact": false,
          "family_types": [
            "zombie"
          ],
          "seats": {
            "position": [ 0.0, 0.975, 0.0 ]
          }
        }
      },
      "component:rideable_sheared": {
        "minecraft:rideable": {
          "controlling_seat": 0,
          "seat_count": 1,
          "crouching_skip_interact": true,
          "pull_in_entities": false,
          "rider_can_interact": false,
          "family_types": [
            "zombie"
          ],
          "seats": {
            "position": [ 0.0, 0.9, 0.0 ]
          }
        }
      },
      
      "component:loot_wooly": {
        "minecraft:loot": {
          "table": "loot_tables/mythical_biomes/entities/nicothekid_mossheep.json"
        }
      },
      "component:loot_sheared": {
        "minecraft:loot": {
          "table": "loot_tables/mythical_biomes/entities/nicothekid_mossheep_sheared.json"
        }
      }
    },
    "components": {
      "minecraft:balloonable": {
        "mass": 0.75
      },
      "minecraft:collision_box": {
        "width": 0.9,
        "height": 1.3
      },
      "minecraft:health": {
        "value": 8,
        "max": 8
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:movement": {
        "value": 0.25
      },
      "minecraft:type_family": {
        "family": [
          "mossheep",
          "sheep",
          "mammal",
          "mob"
        ]
      },

      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_lava": false,
        "breathes_solids": false,
        "breathes_water": false,
        "generates_bubbles": true,
        "inhale_time": 0,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:despawn": {
        "despawn_from_chance": true,
        "despawn_from_inactivity": true,
        "despawn_from_simulation_edge": true,
        "remove_child_entities": false,
        "min_range_inactivity_timer": 30,
        "min_range_random_chance": 800,
        "despawn_from_distance": {
          "max_distance": 128,
          "min_distance": 32
        }
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            }
          }
        ]
      },
      "minecraft:interact": {
        "interactions": [
          {
            "cooldown": 2.5,
            "cooldown_after_being_attacked": 20,
            "health_amount": 0,
            "hurt_item": 1,
            "swing": false,
            "use_item": false,
            "play_sounds": "shear",
            "vibration": "shear",
            "interact_text": "action.interact.shear",
            "spawn_items": { 
              "table": "loot_tables/mythical_biomes/entities/nicothekid_mossheep_shear.json"
            },
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "has_equipment",
                    "subject": "other",
                    "domain": "hand",
                    "value": "shears",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player",
                    "operator": "=="
                  },
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_baby",
                    "operator": "!="
                  },
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_sheared",
                    "operator": "!="
                  }
                ]
              },
              "event": "minecraft:on_sheared",
              "target": "self"
            }
          }
        ]
      },
      "minecraft:jump.static": {
        "jump_power": 0.42
      },
      "minecraft:leashable": {
        "soft_distance": 4.0,
        "hard_distance": 6.0,
        "max_distance": 10.0
      },
      "minecraft:movement.basic": {
        "max_turn": 30.0
      },
      "minecraft:nameable": {
        "allow_name_tag_renaming": true,
        "always_show": false
      },
      "minecraft:navigation.walk": {
        "avoid_damage_blocks": true,
        "avoid_portals": false,
        "avoid_sun": false,
        "avoid_water": true,
        "can_breach": false,
        "can_break_doors": false,
        "can_jump": true,
        "can_open_doors": false,
        "can_open_iron_doors": false,
        "can_pass_doors": true,
        "can_path_from_air": false,
        "can_path_over_lava": false,
        "can_path_over_water": true,
        "can_sink": true,
        "can_swim": false,
        "can_walk": true,
        "can_walk_in_lava": false,
        "is_amphibious": false,
        "blocks_to_avoid": [
          "minecraft:fire",
          "minecraft:flowing_lava",
          "minecraft:lava",
          "minecraft:magma",
          "minecraft:soul_fire"
        ]
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },

      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "force": false,
        "ignore_mob_damage": false,
        "prefer_water": false,
        "speed_multiplier": 1.25
      },
      "minecraft:behavior.mount_pathing": {
        "priority": 2,
        "speed_multiplier": 1.50,
        "target_dist": 0.0,
        "track_target": true
      },
      "minecraft:behavior.tempt": {
        "priority": 4,
        "can_get_scared": false,
        "can_tempt_vertically": false,
        "can_tempt_while_ridden": false,
        "speed_multiplier": 1.25,
        "within_radius": 16,
        "items": [
          {
            "tags": "query.any_tag('mossy_plant')"
          },
          "nicothekid:mossy_plant"
        ]
      },
      "minecraft:behavior.eat_block": {
        "priority": 5,
        "time_until_eat": 1.8,
        "success_chance": "query.is_baby ? 0.02 : 0.001",
        "eat_and_replace_block_pairs": [
          {
            "eat_block": "minecraft:moss_block",
            "replace_block": "minecraft:grass"
          },
          {
            "eat_block": "nicothekid:moss_sprouts_tall_block",
            "replace_block": "nicothekid:moss_sprouts_small_block"
          },
          {
            "eat_block": "nicothekid:moss_sprouts_small_block",
            "replace_block": "minecraft:air"
          }
        ],
        "on_eat": {
          "event": "minecraft:on_eat_block",
          "target": "self"
        }
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 0.8
      },
      "minecraft:behavior.look_at_player": {
        "priority": 7,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 8.0,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.random_look_around": {
        "priority": 8,
        "look_time": [ 2, 4 ]
      },
      
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "randomize": [
              {
                "weight": 100,
                "remove": {},
                "trigger": "spawn_adult"
              },
              {
                "weight": 10,
                "remove": {},
                "trigger": "spawn_baby"
              }
            ]
          }
        ]
      },
      "spawn_adult": {
        "add": {
          "component_groups": [
            "component:sheep_adult",
            "component:rideable_wooly",
            "component:loot_wooly"
          ]
        }
      },
      "spawn_baby": {
        "add": {
          "component_groups": [
            "component:sheep_baby",
            "component:rideable_wooly"
          ]
        }
      },
      "minecraft:entity_born": {
        "add": {
          "component_groups": [
            "component:sheep_baby",
            "component:rideable_wooly"
          ]
        }
      },

      "minecraft:ageable_grow_up": {
        "remove": {
          "component_groups": [
            "component:sheep_baby"
          ]
        },
        "add": {
          "component_groups": [
            "component:sheep_adult",
            "component:rideable_wooly",
            "component:loot_wooly"
          ]
        }
      },
      "minecraft:on_sheared": {
        "remove": {
          "component_groups": [
            "component:rideable_wooly",
            "component:loot_wooly"
          ]
        },
        "add": {
          "component_groups": [
            "component:sheep_sheared",
            "component:rideable_sheared",
            "component:loot_sheared"
          ]
        }
      },
      "minecraft:on_eat_block": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "self",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                }
              ]
            },
            "add": {
              "component_groups": [
                "component:rideable_wooly",
                "component:loot_wooly"
              ]
            },
            "remove": {
              "component_groups": [
                "component:sheep_sheared",
                "component:rideable_sheared",
                "component:loot_sheared"
              ]
            }
          }
        ]
      }
    }
  }
}
