{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:crystalmite",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:variant_0_amethyst": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:loot": {
          "table": "loot_tables/nicos_cave_expansion/entities/nicothekid_crystalmite_amethyst.json"
        }
      },
      "component:variant_1_quartz": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:loot": {
          "table": "loot_tables/nicos_cave_expansion/entities/nicothekid_crystalmite_quartz.json"
        }
      },
      "component:variant_2_rose_quartz": {
        "minecraft:variant": {
          "value": 2
        },
        "minecraft:loot": {
          "table": "loot_tables/nicos_cave_expansion/entities/nicothekid_crystalmite_rose_quartz.json"
        }
      }
    },
    "components": {
      "minecraft:balloonable": {
        "mass": 1.0
      },
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "width": 0.5,
        "height": 0.7
      },
      "minecraft:health": {
        "value": 12,
        "max": 12
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:movement": {
        "value": 0.15
      },
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:type_family": {
        "family": [
          "crystalmite",
          "arthropod",
          "mob"
        ]
      },
      
      "minecraft:attack": {
        "damage": [ 1, 2 ]
      },
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_lava": false,
        "breathes_solids": true,
        "breathes_water": false,
        "generates_bubbles": true,
        "inhale_time": 0,
        "suffocate_time": 0,
        "total_supply": 30
      },
      "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:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            }
          }
        ]
      },
      "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.climb": {
        "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.hurt_by_target": {
        "priority": 2,
        "alert_same_type": false,
        "hurt_owner": false,
        "entity_types": [
          {
            "must_see": false,
            "reevaluate_description": false,
            "max_dist": 16,
            "walk_speed_multiplier": 1.10,
            "sprint_speed_multiplier": 1.10,
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "creeper",
                  "operator": "!="
                }
              ]
            }
          }
        ]
      },
      "minecraft:behavior.melee_attack": {
        "priority": 3,
        "attack_once": false,
        "track_target": true,
        "require_complete_path": false,
        "cooldown_time": 1,
        "speed_multiplier": 1.20
      },
      "minecraft:behavior.random_stroll": {
        "priority": 4,
        "speed_multiplier": 1.0
      },
      "minecraft:behavior.look_at_player": {
        "priority": 5,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 6.0,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.random_look_around": {
        "priority": 6,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.look_at_entity": {
        "priority": 7,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 4.0,
        "look_time": [ 1, 2 ],
        "filters": {
          "any_of": [
            {
              "test": "is_family",
              "subject": "other",
              "value": "mob",
              "operator": "=="
            }
          ]
        }
      },
      
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:variant_0_amethyst"
              ]
            }
          },
          {
            "weight": 75,
            "remove": {},
            "add": {
              "component_groups": [
                "component:variant_1_quartz"
              ]
            }
          },
          {
            "weight": 50,
            "remove": {},
            "add": {
              "component_groups": [
                "component:variant_2_rose_quartz"
              ]
            }
          }
        ]
      }
    }
  }
}
