{
  "format_version": "1.8.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:salmon",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },

    "component_groups": {
      "scale_small": {
        "minecraft:scale": {
          "value": 0.5
        },

        "minecraft:health": {
          "value": 6,
          "max": 6
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/salmon_normal.json"
        }
      },
      "scale_normal": {
        "minecraft:scale": {
          "value": 1
        },

        "minecraft:health": {
          "value": 6,
          "max": 6
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/salmon_normal.json"
        }
      },

      "scale_large": {
        "minecraft:scale": {
          "value": 1.5
        },
        "minecraft:health": {
          "value": 6,
          "max": 6
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/salmon_large.json"
        }
      }
    },

    "components": {
      "minecraft:type_family": {
        "family": [ "salmon", "fish" ]
      },
      "minecraft:collision_box": {
        "width": 0.5,
        "height": 0.5
      },

      "minecraft:breathable": {
        "totalSupply": 15,
        "suffocateTime": 0,
        "breathesAir": false,
        "breathesWater": true
      },
      "minecraft:movement": {
        "value": 0.12
      },
      "minecraft:underwater_movement": {
        "value": 0.12
      },
      "minecraft:navigation.generic": { // Allows the mob to go through water
        "is_amphibious": false,
        "can_path_over_water": false,
        "can_swim": true,
        "can_walk": false,
        "can_breach": false,
        "can_sink": false
      },
      "minecraft:movement.sway": {
        "sway_amplitude": 0.0
      },
      "minecraft:physics": {
        "has_gravity": false
      },
      "minecraft:behavior.avoid_mob_type": {
        "priority": 1,
        "entity_types": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            "max_dist": 3,
            "max_flee": 10,
            "walk_speed_multiplier": 1.5,
            "sprint_speed_multiplier": 2.0
          }
        ]
      },
      "minecraft:behavior.swim_idle": {
        "priority": 5
      },

      "minecraft:behavior.random_swim": { // Randomly selects points to go to, even in water
        "speed_multiplier": 1.0,
        "priority": 3,
        "xz_dist": 16,
        "y_dist": 4,
        "interval": 0
      },

      "minecraft:behavior.swim_wander": {
        "priority": 4,
        "speed_multiplier": 0.014,
        "interval": 60
      },
      "minecraft:nameable": {
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 30,
            "add": {
              "component_groups": [ "adult", "scale_small" ]
            }
          },
          {
            "weight": 50,
            "add": {
              "component_groups": [ "adult", "scale_normal" ]
            }
          },
          {
            "weight": 15,
            "add": {
              "component_groups": [ "adult", "scale_large" ]
            }
          }
        ]
      }
    }
  }
}