{
  "format_version": "1.8.0",
  "minecraft:spawn_rules": {
    "description": {
      "identifier": "minecraft:tropicalfish",
      "population_control": "water_animal"
    },
    "conditions": [
      {
        "minecraft:spawns_on_surface": {},
        "minecraft:spawns_underwater": {},

        "minecraft:distance_filter": {
          "min": 12,
          "max": 32
        },
        "minecraft:weight": {
          "default": 75
        },
        "minecraft:density_limit": {
          "surface": 20
        },
        "minecraft:height_filter": {
          "min": 50,
          "max": 64
        },
        "minecraft:herd": [
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_anenonme"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_black_tang"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_blue_dory"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_butterfly_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_cichlid"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_clownfish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_cc_betta"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_dog_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_e_red_snapper"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_goat_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_moorish_idol"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_ornate_butterfly"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_parrot_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_queen_angel_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_cichlid"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_lipped_benny"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_snapper"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_threadfin"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_tomato_clown"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_triggerfish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_yellow_tang"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_yellow_tail_parrot"
          }
        ],

        "minecraft:biome_filter": [
          {
            "test": "has_biome_tag",
            "operator": "==",
            "value": "ocean"
          },
          {
            "any_of": [
              {
                "test": "has_biome_tag",
                "operator": "==",
                "value": "warm"
              },
              {
                "test": "has_biome_tag",
                "operator": "==",
                "value": "lukewarm"
              }
            ]
          }
        ]
      },
      {
        "minecraft:spawns_on_surface": {},
        "minecraft:spawns_underwater": {},

        "minecraft:distance_filter": {
          "min": 12,
          "max": 32
        },
        "minecraft:weight": {
          "default": 25
        },
        "minecraft:density_limit": {
          "surface": 20
        },
        "minecraft:height_filter": {
          "min": 50,
          "max": 64
        },
        "minecraft:herd": {
          "min_size": 1,
          "max_size": 3
        },
        "minecraft:biome_filter": [
          {
            "test": "has_biome_tag",
            "operator": "==",
            "value": "ocean"
          },
          {
            "any_of": [
              {
                "test": "has_biome_tag",
                "operator": "==",
                "value": "warm"
              },
              {
                "test": "has_biome_tag",
                "operator": "==",
                "value": "lukewarm"
              }
            ]
          }
        ]
      },
      {
        "minecraft:spawns_underground": {},
        "minecraft:spawns_underwater": {},

        "minecraft:distance_filter": {
          "min": 12,
          "max": 32
        },
        "minecraft:weight": {
          "default": 75
        },
        "minecraft:density_limit": {
          "surface": 20
        },
        "minecraft:herd": [
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_anenonme"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_black_tang"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_blue_dory"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_butterfly_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_cichlid"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_clownfish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_cc_betta"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_dog_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_e_red_snapper"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_goat_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_moorish_idol"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_ornate_butterfly"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_parrot_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_queen_angel_fish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_cichlid"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_lipped_benny"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_red_snapper"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_threadfin"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_tomato_clown"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_triggerfish"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_yellow_tang"
          },
          {
            "min_size": 3,
            "max_size": 5,
            "event": "minecraft:become_yellow_tail_parrot"
          }
        ],
        "minecraft:biome_filter": {
          "test": "has_biome_tag",
          "operator": "==",
          "value": "lush_caves"
        }
      },
      {
        "minecraft:spawns_underground": {},
        "minecraft:spawns_underwater": {},

        "minecraft:distance_filter": {
          "min": 12,
          "max": 32
        },
        "minecraft:weight": {
          "default": 25
        },
        "minecraft:density_limit": {
          "surface": 20
        },
        "minecraft:herd": {
          "min_size": 1,
          "max_size": 3
        },
        "minecraft:biome_filter": {
          "test": "has_biome_tag",
          "operator": "==",
          "value": "lush_caves"
        }
      }
    ]
  }
}
