{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:tropicalfish",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },

    "component_groups": {

      "minecraft:tropicalfish_variant_a": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_variant_b": {
        "minecraft:variant": {
          "value": 1
        }
      },

      "minecraft:tropicalfish_variant_pattern_1": {
        "minecraft:mark_variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_variant_pattern_2": {
        "minecraft:mark_variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_variant_pattern_3": {
        "minecraft:mark_variant": {
          "value": 2
        }
      },
      "minecraft:tropicalfish_variant_pattern_4": {
        "minecraft:mark_variant": {
          "value": 3
        }
      },
      "minecraft:tropicalfish_variant_pattern_5": {
        "minecraft:mark_variant": {
          "value": 4
        }
      },
      "minecraft:tropicalfish_variant_pattern_6": {
        "minecraft:mark_variant": {
          "value": 5
        }
      },


      "minecraft:tropicalfish_base_white": {
        "minecraft:color": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_base_orange": {
        "minecraft:color": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_base_magenta": {
        "minecraft:color": {
          "value": 2
        }
      },
      "minecraft:tropicalfish_base_lightblue": {
        "minecraft:color": {
          "value": 3
        }
      },
      "minecraft:tropicalfish_base_yellow": {
        "minecraft:color": {
          "value": 4
        }
      },
      "minecraft:tropicalfish_base_lightgreen": {
        "minecraft:color": {
          "value": 5
        }
      },
      "minecraft:tropicalfish_base_pink": {
        "minecraft:color": {
          "value": 6
        }
      },
      "minecraft:tropicalfish_base_gray": {
        "minecraft:color": {
          "value": 7
        }
      },
      "minecraft:tropicalfish_base_silver": {
        "minecraft:color": {
          "value": 8
        }
      },
      "minecraft:tropicalfish_base_cyan": {
        "minecraft:color": {
          "value": 9
        }
      },
      "minecraft:tropicalfish_base_purple": {
        "minecraft:color": {
          "value": 10
        }
      },
      "minecraft:tropicalfish_base_blue": {
        "minecraft:color": {
          "value": 11
        }
      },
      "minecraft:tropicalfish_base_brown": {
        "minecraft:color": {
          "value": 12
        }
      },
      "minecraft:tropicalfish_base_green": {
        "minecraft:color": {
          "value": 13
        }
      },
      "minecraft:tropicalfish_base_red": {
        "minecraft:color": {
          "value": 14
        }
      },


      "minecraft:tropicalfish_pattern_white": {
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_pattern_orange": {
        "minecraft:color2": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_pattern_magenta": {
        "minecraft:color2": {
          "value": 2
        }
      },
      "minecraft:tropicalfish_pattern_lightblue": {
        "minecraft:color2": {
          "value": 3
        }
      },
      "minecraft:tropicalfish_pattern_yellow": {
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:tropicalfish_pattern_lightgreen": {
        "minecraft:color2": {
          "value": 5
        }
      },
      "minecraft:tropicalfish_pattern_pink": {
        "minecraft:color2": {
          "value": 6
        }
      },
      "minecraft:tropicalfish_pattern_gray": {
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:tropicalfish_pattern_silver": {
        "minecraft:color2": {
          "value": 8
        }
      },
      "minecraft:tropicalfish_pattern_cyan": {
        "minecraft:color2": {
          "value": 9
        }
      },
      "minecraft:tropicalfish_pattern_purple": {
        "minecraft:color2": {
          "value": 10
        }
      },
      "minecraft:tropicalfish_pattern_blue": {
        "minecraft:color2": {
          "value": 11
        }
      },
      "minecraft:tropicalfish_pattern_brown": {
        "minecraft:color2": {
          "value": 12
        }
      },
      "minecraft:tropicalfish_pattern_green": {
        "minecraft:color2": {
          "value": 13
        }
      },
      "minecraft:tropicalfish_pattern_red": {
        "minecraft:color2": {
          "value": 14
        }
      },

      //predefined school types
      "minecraft:anenonme": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 1
        },
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:black_tang": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:blue_dory": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 3
        }
      },
      "minecraft:butterfly_fish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:cichlid": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 11
        },
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:clownfish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:color": {
          "value": 1
        },
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:cc_betta": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:color": {
          "value": 6
        },
        "minecraft:color2": {
          "value": 3
        }
      },
      "minecraft:dog_fish": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:color": {
          "value": 10
        },
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:e_red_snapper": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 14
        }
      },
      "minecraft:goat_fish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:moorish_idol": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 2
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:ornate_butterfly": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 1
        }
      },
      "minecraft:parrot_fish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:color": {
          "value": 9
        },
        "minecraft:color2": {
          "value": 6
        }
      },
      "minecraft:queen_angel_fish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:color": {
          "value": 5
        },
        "minecraft:color2": {
          "value": 3
        }
      },
      "minecraft:red_cichlid": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:red_lipped_benny": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 2
        },
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 14
        }
      },
      "minecraft:red_snapper": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:threadfin": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:tomato_clown": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:triggerfish": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:yellow_tang": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:color": {
          "value": 4
        },
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:yellowtail_parrot": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:color": {
          "value": 9
        },
        "minecraft:color2": {
          "value": 4
        }
      }
    },

    "components": {
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
      },
      "minecraft:type_family": {
        "family": [ "tropicalfish", "fish" ]
      },
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 0.4
      },
      "minecraft:health": {
        "value": 6,
        "max": 6
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/tropicalfish.json"
      },
      "minecraft:scale": {
        "value": 1.3
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0,
        "breathes_air": false,
        "breathes_water": 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:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:behavior.swim_idle": {
        "priority": 5,
        "idle_time": 5.0,
        "success_rate": 0.1
      },
      "minecraft:behavior.random_swim": { // Randomly selects points to go to, even in water
        "priority": 3,
        "speed_multiplier": 1.0,
        "xz_dist": 16,
        "y_dist": 4,
        "interval": 0
      },
      "minecraft:behavior.avoid_mob_type": {
        "priority": 1,
        "entity_types": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            "max_dist": 6,
            "walk_speed_multiplier": 1.5,
            "sprint_speed_multiplier": 2.0
          }
        ]
      },
      "minecraft:behavior.swim_wander": {
        "priority": 4,
        "interval": 0.1,
        "look_ahead": 2.0,
        "speed_multiplier": 1.0,
        "wander_time": 5.0
      },
      "minecraft:flocking": {
        "in_water": true,
        "match_variants": true,
        "use_center_of_mass": false,
        "low_flock_limit": 4,
        "high_flock_limit": 8,
        "goal_weight": 2.0,
        "loner_chance": 0.1,
        "influence_radius": 3.0,
        "breach_influence": 7.0,
        "separation_weight": 0.65,
        "separation_threshold": 0.15,
        "cohesion_weight": 2.75,
        "cohesion_threshold": 1.5,
        "innner_cohesion_threshold": 1.5,
        "min_height": 1.5,
        "max_height": 6.0,
        "block_distance": 2.0,
        "block_weight": 0.85
      },
      "minecraft:nameable": {
      }
    },

    "events": {
      "minecraft:become_anenonme": {
        "add": { "component_groups": [ "minecraft:anenonme" ] }
      },
      "minecraft:become_black_tang": {
        "add": { "component_groups": [ "minecraft:black_tang" ] }
      },
      "minecraft:become_blue_dory": {
        "add": { "component_groups": [ "minecraft:blue_dory" ] }
      },
      "minecraft:become_butterfly_fish": {
        "add": { "component_groups": [ "minecraft:butterfly_fish" ] }
      },
      "minecraft:become_cichlid": {
        "add": { "component_groups": [ "minecraft:cichlid" ] }
      },
      "minecraft:become_clownfish": {
        "add": { "component_groups": [ "minecraft:clownfish" ] }
      },
      "minecraft:become_cc_betta": {
        "add": { "component_groups": [ "minecraft:cc_betta" ] }
      },
      "minecraft:become_dog_fish": {
        "add": { "component_groups": [ "minecraft:dog_fish" ] }
      },
      "minecraft:become_e_red_snapper": {
        "add": { "component_groups": [ "minecraft:e_red_snapper" ] }
      },
      "minecraft:become_goat_fish": {
        "add": { "component_groups": [ "minecraft:goat_fish" ] }
      },
      "minecraft:become_moorish_idol": {
        "add": { "component_groups": [ "minecraft:moorish_idol" ] }
      },
      "minecraft:become_ornate_butterfly": {
        "add": { "component_groups": [ "minecraft:ornate_butterfly" ] }
      },
      "minecraft:become_parrot_fish": {
        "add": { "component_groups": [ "minecraft:parrot_fish" ] }
      },
      "minecraft:become_queen_angel_fish": {
        "add": { "component_groups": [ "minecraft:queen_angel_fish" ] }
      },
      "minecraft:become_red_cichlid": {
        "add": { "component_groups": [ "minecraft:red_cichlid" ] }
      },
      "minecraft:become_red_lipped_benny": {
        "add": { "component_groups": [ "minecraft:red_lipped_benny" ] }
      },
      "minecraft:become_red_snapper": {
        "add": { "component_groups": [ "minecraft:red_snapper" ] }
      },
      "minecraft:become_threadfin": {
        "add": { "component_groups": [ "minecraft:threadfin" ] }
      },
      "minecraft:become_tomato_clown": {
        "add": { "component_groups": [ "minecraft:tomato_clown" ] }
      },
      "minecraft:become_triggerfish": {
        "add": { "component_groups": [ "minecraft:triggerfish" ] }
      },
      "minecraft:become_yellow_tang": {
        "add": { "component_groups": [ "minecraft:yellow_tang" ] }
      },
      "minecraft:become_yellow_tail_parrot": {
        "add": { "component_groups": [ "minecraft:yellow_tail_parrot" ] }
      },


      "minecraft:entity_spawned": {
        "sequence": [
          {
            "add": {
              "component_groups": [ "adult" ]
            }
          },
          {
            "randomize": [
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_a"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_b"
                  ]
                }
              }
            ]
          },
          {
            "randomize": [
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_1"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_2"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_3"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_4"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_5"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_pattern_6"
                  ]
                }
              }
            ]
          },
          {
            "randomize": [
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_white"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_orange"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_magenta"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_lightblue"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_yellow"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_lightgreen"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_pink"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_gray"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_silver"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_cyan"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_purple"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_blue"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_brown"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_green"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_base_red"
                  ]
                }
              }
            ]
          },
          {
            "randomize": [
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_white"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_orange"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_magenta"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_lightblue"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_yellow"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_lightgreen"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_pink"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_gray"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_silver"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_cyan"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_purple"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_blue"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_brown"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_green"
                  ]
                }
              },
              {
                "weight": 1,
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_pattern_red"
                  ]
                }
              }
            ]
          }
        ]
      }
    }
  }
}