{
  "format_version": "1.10.0",
  "minecraft:entity": {
    "description": {
      "identifier": "ghost:shade1",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "minecraft:baby_drowned": {
        "minecraft:is_baby": {},
        "minecraft:scale": {
          "value": 0.5
        },
        "minecraft:movement": {
          "value": 0.6
        },
        "minecraft:underwater_movement": {
          "value": 0.06
        }
      },
      "minecraft:adult_drowned": {
        "minecraft:loot": {
          "table": "loot_tables/entities/drowned.json"
        }
      },
      "minecraft:mode_switcher": {
        "minecraft:target_nearby_sensor": {
          "inside_range": 3.0,
          "outside_range": 5.0,
          "on_inside_range": {
            "event": "minecraft:switch_to_melee",
            "target": "self"
          },
          "on_outside_range": {
            "event": "minecraft:switch_to_ranged",
            "target": "self"
          }
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/drowned_ranged_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.weapon.offhand",
              "drop_chance": 1.0
            }
          ]
        }
      },
      "minecraft:ranged_mode": {
        "minecraft:shooter": {
          "def": "minecraft:thrown_trident"
        },
        "minecraft:behavior.ranged_attack": {
          "priority": 3,
          "attack_interval_min": 1,
          "attack_interval_max": 3,
          "attack_radius": 10
        }
      },
      "minecraft:melee_mode": {
        "minecraft:behavior.melee_attack": {
          "priority": 3,
          "speed_multiplier": 1,
          "track_target": false
        },
        "minecraft:equipment": {
          "table": "loot_tables/entities/drowned_equipment.json",
          "slot_drop_chance": [
            {
              "slot": "slot.weapon.offhand",
              "drop_chance": 1.0
            }
          ]
        }
      },
      "minecraft:hunter_mode": {
        "minecraft:navigation.generic": {
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_break_doors": true,
          "can_swim": true,
          "can_walk": true,
          "avoid_sun": true
        }
      },
      "minecraft:wander_mode": {
        "minecraft:navigation.generic": {
          "is_amphibious": true,
          "can_path_over_water": false,
          "can_break_doors": true,
          "can_swim": false,
          "can_walk": true,
          "avoid_sun": true
        }
      }
    },
    "components": {
      "minecraft:type_family": {
        "family": []
      },
      "minecraft:collision_box": {
        "height": 0.0,
        "width": 0.0
      },
      "minecraft:underwater_movement": {
        "value": 0.06
      },
      "minecraft:movement.generic": {},
      "minecraft:jump.static": {},
      "minecraft:can_climb": {},
      "minecraft:health": {
        "value": 20,
        "max": 20
      },
      "minecraft:movement": {
        "value": 0.6
      },
      "minecraft:navigation.generic": {
        "is_amphibious": true,
        "can_path_over_water": false,
        "can_break_doors": true,
        "can_swim": false,
        "can_walk": true,
        "avoid_sun": true
      },
      "minecraft:behavior.stomp_turtle_egg": {
        "priority": 4,
        "speed_multiplier": 1,
        "search_range": 10,
        "search_height": 3,
        "goal_radius": 1.14,
        "search_count": 4,
        "interval": 20
      },
      "minecraft:behavior.move_towards_restriction": {
        "priority": 5,
        "speed_multiplier": 1
      },
      "minecraft:behavior.random_stroll": {
        "priority": 6,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 7,
        "look_distance": 6,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 7
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3
      },
      "minecraft:physics": {},
      "minecraft:on_target_acquired": {
        "event": "on:target_acquired",
        "target": "self"
      },
      "minecraft:on_target_escape": {
        "event": "on:target_escape",
        "target": "self"
      },
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 0 : 0"
      },
      "minecraft:scale": {
        "value": 1
      },
      "minecraft:behavior.owner_hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.owner_hurt_target": {
        "priority": 2
      },
      "minecraft:on_death": {
        "event": "on:death",
        "target": "self"
      },
      "minecraft:on_hurt": {
        "event": "on:hurt",
        "target": "self"
      },
      "minecraft:on_hurt_by_player": {
        "event": "on:hurt_by_player",
        "target": "self"
      },
      "minecraft:on_ignite": {
        "event": "on:ignite",
        "target": "self"
      },
      "minecraft:on_wake_with_owner": {
        "event": "on:wake_with_owner",
        "target": "self"
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 15,
            "remove": {},
            "add": {
              "component_groups": [
                "minecraft:mode_switcher",
                "minecraft:ranged_mode",
                "minecraft:adult_drowned"
              ]
            }
          },
          {
            "weight": 85,
            "randomize": [
              {
                "weight": 95,
                "remove": {},
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:adult_drowned"
                  ]
                }
              },
              {
                "weight": 5,
                "remove": {},
                "add": {
                  "component_groups": [
                    "minecraft:melee_mode",
                    "minecraft:baby_drowned"
                  ]
                }
              }
            ]
          }
        ]
      },
      "minecraft:as_baby": {
        "add": {
          "component_groups": [
            "minecraft:melee_mode",
            "minecraft:baby_drowned"
          ]
        }
      },
      "minecraft:as_adult": {
        "add": {
          "component_groups": [
            "minecraft:melee_mode",
            "minecraft:adult_drowned"
          ]
        }
      },
      "minecraft:switch_to_melee": {
        "remove": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        }
      },
      "minecraft:switch_to_ranged": {
        "remove": {
          "component_groups": [
            "minecraft:melee_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:ranged_mode"
          ]
        }
      },
      "minecraft:has_target": {
        "remove": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        }
      },
      "minecraft:lost_target": {
        "remove": {
          "component_groups": [
            "minecraft:hunter_mode"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:wander_mode"
          ]
        }
      },
      "on:death": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt": {
        "run_command": {
          "command": []
        }
      },
      "on:hurt_by_player": {
        "run_command": {
          "command": []
        }
      },
      "on:ignite": {
        "run_command": {
          "command": []
        }
      },
      "on:target_acquired": {
        "run_command": {
          "command": []
        }
      },
      "on:target_escape": {
        "run_command": {
          "command": []
        }
      },
      "on:wake_with_owner": {
        "run_command": {
          "command": []
        }
      }
    }
  }
}