{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "wesl3y:marine",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "wesl3y:despawn":{
        "minecraft:instant_despawn": {}
      },
      "default": {
        "minecraft:knockback_resistance": {
          "value": 0
        },
        "minecraft:movement": {
          "value": 0.3
        },
        "minecraft:behavior.melee_attack": {
          "priority": 2,
          "speed_multiplier": 1.0,
          "track_target": true,
          "reach_multiplier": 0.125
        },
        "minecraft:behavior.hurt_by_target": {
          "priority": 1
        },
        "minecraft:behavior.random_stroll": {
          "priority": 7,
          "speed_multiplier": 1
        },
        "minecraft:behavior.look_at_player": {
          "priority": 8,
          "look_distance": 6,
          "probability": 0.02
        },
        "minecraft:behavior.random_look_around": {
          "priority": 9
        }
      }
    },
    "components": {
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 5 : 0"
      },
      "minecraft:type_family": {
        "family": [ "marine", "mob" ]
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:nameable": {},
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.8
      },
      "minecraft:health": {
        "value": 40
      },
      "minecraft:attack": {
        "damage": 2
      },
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:follow_range": {
        "value": 32,
        "max": 32
      },
      "minecraft:loot": {
        "table": "loot_tables/entites/marine.json"
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "on_damage": {
              "filters": {
                "all_of": [
                  { "test":"has_damage","value":"fatal" },
                  {
                    "any_of": [
                      { "test":"is_family","subject": "other","value":"damage" },
                      { "test":"is_family","subject": "other","value":"player" }
                    ]
                  }
                ]
              },
              "event": "wesl3y:kill"
            }
          }
        ]
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 0,
        "must_see": true,
        "reselect_targets": false,
        "entity_types": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            "max_dist": 20
          }
        ]
      },
      "minecraft:despawn": {
        "filters": {
          "all_of": [
            {"test": "distance_to_nearest_player", "operator": ">", "value": 60}
          ]
        }
      },
      "minecraft:navigation.walk": {
        "can_path_over_lava": true,
        "is_amphibious": true,
        "can_pass_doors":true,
        "can_walk":true,
        "can_open_doors": true,
        "can_path_over_water": true,
        "can_walk_in_lava": false,
        "avoid_water": true
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:can_climb": {},
      "minecraft:physics": {},
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:conditional_bandwidth_optimization": {}
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "default"
          ]
        }
      },
      "wesl3y:despawn": {
        "add": {
          "component_groups": [
            "wesl3y:despawn"
          ]
        }
      }
    }
  }
}