{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:moss_shroom",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:shroom_adult": {
        "minecraft:scale": {
          "value": 1.0
        },

        "minecraft:breedable": {
          "allow_sitting": false,
          "causes_pregnancy": false,
          "inherit_tamed": true,
          "require_full_health": true,
          "require_tame": false,
          "extra_baby_chance": 0,
          "breed_cooldown": 60,
          "breed_items": [
            "minecraft:azalea"
          ],
          "breeds_with": {
            "mate_type": "nicothekid:moss_shroom",
            "baby_type": "nicothekid:moss_shroom",
            "breed_event": {
              "event": "minecraft:entity_born",
              "target": "baby"
            }
          }
        },
        "minecraft:spawn_entity": {
          "entities": {
            "min_wait_time": 3000,
            "max_wait_time": 12000,
            "single_use": false,
            "should_leash": false,
            "spawn_sound": "plop",
            "spawn_item": "nicothekid:mosshroom_fungus",
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "value": "minecraft:is_tamed",
                  "operator": "=="
                },
                {
                  "test": "has_component",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                }
              ]
            }
          }
        },
        "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"
        },
        "minecraft:loot": {
          "table": "loot_tables/nicos_cave_expansion/entities/nicothekid_moss_shroom.json"
        }
      },
      "component:shroom_wild": {
        "minecraft:health": {
          "value": 12,
          "max": 12
        },
        "minecraft:type_family": {
          "family": [
            "moss_shroom",
            "shroom",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 0
        },

        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "test": "is_daytime",
                "value": true
              },
              "event": "minecraft:configure_day"
            },
            {
              "filters": {
                "test": "is_daytime",
                "value": false
              },
              "event": "minecraft:configure_night"
            }
          ]
        },
        "minecraft:navigation.walk": {
          "avoid_damage_blocks": true,
          "avoid_portals": false,
          "avoid_sun": true,
          "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:tameable": {
          "probability": 0.33,
          "tame_items": [
            "minecraft:flowering_azalea"
          ],
          "tame_event": {
            "event": "minecraft:on_tame",
            "target": "self"
          }
        },
        "minecraft:behavior.avoid_mob_type": {
          "priority": 6,
          "remove_target": false,
          "avoid_target_xz": 16,
          "avoid_target_y": 7,
          "max_dist": 3.0,
          "max_flee": 10.0,
          "probability_per_strength": 1.0,
          "sprint_distance": 7.0,
          "sprint_speed_multiplier": 1.1,
          "walk_speed_multiplier": 1.1,
          "entity_types": [
            {
              "must_see": true,
              "reevaluate_description": false,
              "max_dist": 8,
              "walk_speed_multiplier": 1.0,
              "sprint_speed_multiplier": 1.0,
              "filters": {
                "any_of": [
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "monster",
                    "operator": "=="
                  }
                ]
              }
            }
          ]
        },
        "minecraft:behavior.flee_sun": {
          "priority": 7,
          "speed_multiplier": 1.25
        },
        "minecraft:behavior.tempt": {
          "priority": 10,
          "can_get_scared": true,
          "can_tempt_vertically": false,
          "can_tempt_while_ridden": false,
          "speed_multiplier": 0.5,
          "within_radius": 16,
          "items": [
            "minecraft:azalea",
            "minecraft:flowering_azalea"
          ]
        }
      },
      "component:shroom_baby_wild": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.6
        },
        "minecraft:ageable": {
          "duration": 3000,
          "feed_items": [
            {
              "item": "minecraft:azalea",
              "growth": 0.10
            },
            {
              "item": "minecraft:flowering_azalea",
              "growth": 0.15
            }
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up_wild",
            "target": "self"
          }
        },
        "minecraft:behavior.follow_parent": {
          "priority": 5,
          "speed_multiplier": 1.10
        }
      },
      "component:shroom_tamed": {
        "minecraft:health": {
          "value": 22,
          "max": 22
        },
        "minecraft:is_tamed": {
        },
        "minecraft:type_family": {
          "family": [
            "moss_shroom",
            "shroom",
            "player_tamed",
            "mob"
          ]
        },
        "minecraft:variant": {
          "value": 2
        },

        "minecraft:navigation.walk": {
          "avoid_damage_blocks": true,
          "avoid_portals": false,
          "avoid_sun": false,
          "avoid_water": false,
          "can_breach": false,
          "can_break_doors": false,
          "can_jump": true,
          "can_path_over_water": 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": [
            {
              "tags": "query.any_tag('heated_netherrack_active')"
            },
            "minecraft:fire",
            "minecraft:flowing_lava",
            "minecraft:lava",
            "minecraft:magma",
            "minecraft:soul_fire"
          ]
        },
        "minecraft:persistent": {},
        "minecraft:sittable": {
        },
        "minecraft:behavior.stay_while_sitting": {
          "priority": 2
        },
        "minecraft:behavior.follow_owner": {
          "priority": 4,
          "can_teleport": true,
          "ignore_vibration": true,
          "max_distance": 60.0,
          "start_distance": 14.0,
          "stop_distance": 3.0,
          "speed_multiplier": 1.10
        },
        "minecraft:behavior.tempt": {
          "priority": 10,
          "can_get_scared": false,
          "can_tempt_vertically": true,
          "can_tempt_while_ridden": false,
          "speed_multiplier": 1.1,
          "within_radius": 16,
          "items": [
            "minecraft:azalea",
            "minecraft:flowering_azalea"
          ]
        }
      },
      "component:shroom_baby_tamed": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.6
        },
        "minecraft:ageable": {
          "duration": 3000,
          "feed_items": [
            {
              "item": "minecraft:azalea",
              "growth": 0.10
            },
            {
              "item": "minecraft:flowering_azalea",
              "growth": 0.15
            }
          ],
          "grow_up": {
            "event": "minecraft:ageable_grow_up_tamed",
            "target": "self"
          }
        }
      },
      
      "component:shroom_at_day": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "test": "weather_at_position",
                "value": "thunderstorm"
              },
              "event": "minecraft:configure_thunderstorm"
            },
            {
              "filters": {
                "test": "is_daytime",
                "value": false
              },
              "event": "minecraft:configure_night"
            }
          ]
        },
        "minecraft:behavior.nap": {
          "priority": 8,
          "cooldown_min": 1.0,
          "cooldown_max": 4.0,
          "mob_detect_dist": 4.0,
          "mob_detect_height": 3.0,
          "can_nap_filters": {
            "all_of": [
              {
                "test": "in_water",
                "subject": "self",
                "value": false,
                "operator": "=="
              },
              {
                "test": "on_ground",
                "subject": "self",
                "value": true,
                "operator": "=="
              },
              {
                "test": "is_underground",
                "subject": "self",
                "value": true,
                "operator": "=="
              },
              {
                "test": "weather_at_position",
                "subject": "self",
                "value": "thunderstorm",
                "operator": "!="
              }
            ]
          },
          "wake_mob_exceptions": {
            "any_of": [
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player_tamed",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "cat",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "firefly",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "iron_golem",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "parrot",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "snow_golem",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "villager",
                    "operator": "=="
                  }
                ]
              },
              {
                "all_of": [
                  {
                    "test": "has_component",
                    "subject": "self",
                    "value": "minecraft:is_tamed",
                    "operator": "=="
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "wolf",
                    "operator": "=="
                  }
                ]
              },
              {
                "test": "is_family",
                "subject": "other",
                "value": "shroom",
                "operator": "=="
              },
              {
                "test": "is_sneaking",
                "subject": "other",
                "value": true,
                "operator": "=="
              }
            ]
          }
        },
        "minecraft:behavior.find_cover": {
          "priority": 9,
          "speed_multiplier": 1.0,
          "cooldown_time": 5.0
        }
      },
      "component:shroom_at_night": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "test": "weather_at_position",
                "value": "thunderstorm"
              },
              "event": "minecraft:configure_thunderstorm"
            },
            {
              "filters": {
                "test": "is_daytime",
                "value": true
              },
              "event": "minecraft:configure_day"
            }
          ]
        }
      },
      "component:shroom_at_thunderstorm": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "weather_at_position",
                    "value": "thunderstorm",
                    "operator": "!="
                  },
                  {
                    "test": "is_daytime",
                    "value": true
                  }
                ]
              },
              "event": "minecraft:configure_day"
            },
            {
              "filters": {
                "all_of": [
                  {
                    "test": "weather_at_position",
                    "value": "thunderstorm",
                    "operator": "!="
                  },
                  {
                    "test": "is_daytime",
                    "value": false
                  }
                ]
              },
              "event": "minecraft:configure_night"
            }
          ]
        }
      }
    },
    "components": {
      "minecraft:balloonable": {
        "mass": 1.0
      },
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "width": 0.8,
        "height": 0.9
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:movement": {
        "value": 0.25,
        "max": 0.25
      },

      "minecraft:attack": {
        "damage": [ 1, 2 ]
      },
      "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:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": true,
            "damage_modifier": 0.0,
						"damage_multiplier": 1.0
          }
        ]
      },
      "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:healable": {
        "force_use": false,
				"items": [
					{
						"item": "minecraft:azalea",
						"heal_amount": 3
					},
					{
						"item": "minecraft:flowering_azalea",
						"heal_amount": 3
					}
				]
			},
			"minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
			"minecraft:jump.static": {
        "jump_power": 0.42
      },
      "minecraft:leashable": {
        "can_be_stolen": false,
        "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": false,
        "always_show": false
      },
      "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.random_stroll": {
        "priority": 11,
        "speed_multiplier": 1.0
      },
      "minecraft:behavior.look_at_player": {
        "priority": 12,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 4.0,
        "look_time": [ 1, 2 ]
      },
      "minecraft:behavior.random_look_around": {
        "priority": 13,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.look_at_entity": {
        "priority": 14,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 4.0,
        "look_time": [ 1, 2 ]
      },

      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:shroom_adult",
                "component:shroom_wild"
              ]
            }
          },
          {
            "weight": 20,
            "remove": {},
            "add": {
              "component_groups": [
                "component:shroom_baby_wild",
                "component:shroom_wild"
              ]
            }
          }
        ]
      },
      "minecraft:entity_born": {
        "sequence": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "parent",
                  "value": "minecraft:is_tamed",
                  "operator": "!="
                },
                {
                  "test": "has_component",
                  "subject": "parent",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                }
              ]
            },
            "remove": {},
            "add": {
              "component_groups": [
                "component:shroom_baby_wild",
                "component:shroom_wild"
              ]
            }
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "has_component",
                  "subject": "parent",
                  "value": "minecraft:is_tamed",
                  "operator": "=="
                },
                {
                  "test": "has_component",
                  "subject": "parent",
                  "value": "minecraft:is_baby",
                  "operator": "!="
                }
              ]
            },
            "remove": {},
            "add": {
              "component_groups": [
                "component:shroom_baby_tamed",
                "component:shroom_tamed"
              ]
            }
          }
        ]
      },
      "minecraft:ageable_grow_up_wild": {
        "remove": {
          "component_groups": [
            "component:shroom_baby_wild"
          ]
        },
        "add": {
          "component_groups": [
            "component:shroom_adult"
          ]
        }
      },
      "minecraft:ageable_grow_up_tamed": {
        "remove": {
          "component_groups": [
            "component:shroom_baby_tamed"
          ]
        },
        "add": {
          "component_groups": [
            "component:shroom_adult"
          ]
        }
      },
      "minecraft:on_tame": {
        "sequence": [
          {
            "remove": {
              "component_groups": [
                "component:shroom_wild",
                "component:shroom_at_day",
                "component:shroom_at_night",
                "component:shroom_at_thunderstorm"
              ]
            }
          },
          {
            "add": {
              "component_groups": [
                "component:shroom_tamed"
              ]
            }
          }
        ]
      },
      
      "minecraft:configure_day": {
        "remove": {
          "component_groups": [
            "component:shroom_at_night",
            "component:shroom_at_thunderstorm"
          ]
        },
        "add": {
          "component_groups": [
            "component:shroom_at_day"
          ]
        }
      },
      "minecraft:configure_night": {
        "remove": {
          "component_groups": [
            "component:shroom_at_day",
            "component:shroom_at_thunderstorm"
          ]
        },
        "add": {
          "component_groups": [
            "component:shroom_at_night"
          ]
        }
      },
      "minecraft:configure_thunderstorm": {
        "remove": {
          "component_groups": [
            "component:shroom_at_night",
            "component:shroom_at_day"
          ]
        },
        "add": {
          "component_groups": [
            "component:shroom_at_thunderstorm"
          ]
        }
      }
    }
  }
}