{
  "format_version": "1.26.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:tropicalfish",
      "is_experimental": false,
      "is_summonable": true,
      "is_spawnable": true,
      "spawn_category": "water_ambient"
    },
    "components": {
      "minecraft:behavior.avoid_mob_type": {
        "entity_types": [
          {
            "filters": {
              "AND": [
                {
                  "test": "is_family",
                  "subject": 1,
                  "operator": 0,
                  "value": "player"
                }
              ]
            },
            "max_dist": 6,
            "walk_speed_multiplier": 1.5,
            "sprint_speed_multiplier": 2
          }
        ],
        "priority": 1
      },
      "minecraft:behavior.random_swim": { // Randomly selects points to go to, even in water
        "interval": 0,
        "xz_dist": 16,
        "priority": 3,
        "speed_multiplier": 1,
        "y_dist": 4
      },
      "minecraft:behavior.swim_idle": {
        "priority": 5
      },
      "minecraft:behavior.swim_wander": {
        "interval": 0.1,
        "look_ahead": 2,
        "priority": 4
      },
      "minecraft:breathable": {
        "breathes_air": false,
        "breathes_water": true,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:collision_box": {
        "height": 0.4,
        "width": 0.4
      },
      "minecraft:despawn": {
        "despawn_from_distance": {
          "max_distance": 40,
          "min_distance": 32
        }
      },
      "minecraft:experience_reward": {
        "on_death": {
          "expression": "query.last_hit_by_player ? Math.Random(1,3) : 0",
          "version": 0
        }
      },
      "minecraft:flocking": {
        "breach_influence": 7,
        "block_distance": 2,
        "high_flock_limit": 8,
        "block_weight": 0.85,
        "min_height": 1.5,
        "cohesion_threshold": 1.5,
        "in_water": true,
        "cohesion_weight": 2.75,
        "goal_weight": 2,
        "influence_radius": 3,
        "innner_cohesion_threshold": 1.5,
        "loner_chance": 0.1,
        "low_flock_limit": 4,
        "match_variants": true,
        "max_height": 6,
        "separation_threshold": 0.15,
        "separation_weight": 0.65,
        "use_center_of_mass": false
      },
      "minecraft:health": {
        "max": 6,
        "value": 6
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "cause": "lava",
            "damage_per_tick": 4,
            "filters": {
              "operator": "==",
              "test": "in_lava",
              "subject": "self",
              "value": true
            }
          }
        ]
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/tropicalfish.json"
      },
      "minecraft:movement": {
        "value": 0.12
      },
      "minecraft:movement.sway": {
        "sway_amplitude": 0
      },
      "minecraft:nameable": {},
      "minecraft:navigation.generic": { // Allows the mob to go through water
        "can_breach": false,
        "can_walk": false,
        "can_path_over_water": false,
        "can_sink": false,
        "can_swim": true,
        "is_amphibious": false,
        "using_door_annotation": true
      },
      "minecraft:physics": {
        "has_gravity": false
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:scale": {
        "value": 1.3
      },
      "minecraft:type_family": {
        "family": [
          "tropicalfish",
          "fish"
        ]
      },
      "minecraft:underwater_movement": {
        "value": 0.12
      }
    },
    "component_groups": {
      "minecraft:tropicalfish_base_pink": {
        "minecraft:color": {
          "value": 6
        }
      },
      //predefined school types
      "minecraft:anenonme": {
        "minecraft:color": {
          "value": 1
        },
        "minecraft:color2": {
          "value": 7
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:clownfish": {
        "minecraft:color": {
          "value": 1
        },
        "minecraft:color2": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_variant_pattern_2": {
        "minecraft:mark_variant": {
          "value": 1
        }
      },
      "minecraft:black_tang": {
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 7
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_variant_pattern_5": {
        "minecraft:mark_variant": {
          "value": 4
        }
      },
      "minecraft:cc_betta": {
        "minecraft:color": {
          "value": 6
        },
        "minecraft:color2": {
          "value": 3
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:dog_fish": {
        "minecraft:color": {
          "value": 10
        },
        "minecraft:color2": {
          "value": 4
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_base_lightblue": {
        "minecraft:color": {
          "value": 3
        }
      },
      "minecraft:blue_dory": {
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 3
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:butterfly_fish": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 7
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_base_magenta": {
        "minecraft:color": {
          "value": 2
        }
      },
      "minecraft:cichlid": {
        "minecraft:color": {
          "value": 11
        },
        "minecraft:color2": {
          "value": 7
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_pattern_lightblue": {
        "minecraft:color2": {
          "value": 3
        }
      },
      "minecraft:e_red_snapper": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 14
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_pattern_lightgreen": {
        "minecraft:color2": {
          "value": 5
        }
      },
      "minecraft:tropicalfish_pattern_red": {
        "minecraft:color2": {
          "value": 14
        }
      },
      "minecraft:goat_fish": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 4
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:moorish_idol": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 7
        },
        "minecraft:mark_variant": {
          "value": 2
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:ornate_butterfly": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 1
        },
        "minecraft:mark_variant": {
          "value": 5
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:red_snapper": {
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:parrot_fish": {
        "minecraft:color": {
          "value": 9
        },
        "minecraft:color2": {
          "value": 6
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:queen_angel_fish": {
        "minecraft:color": {
          "value": 5
        },
        "minecraft:color2": {
          "value": 3
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:red_cichlid": {
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 4
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_variant_pattern_6": {
        "minecraft:mark_variant": {
          "value": 5
        }
      },
      "minecraft:red_lipped_benny": {
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 14
        },
        "minecraft:mark_variant": {
          "value": 2
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_variant_pattern_1": {
        "minecraft:mark_variant": {
          "value": 0
        }
      },
      "minecraft:threadfin": {
        "minecraft:color": {
          "value": 0
        },
        "minecraft:color2": {
          "value": 4
        },
        "minecraft:mark_variant": {
          "value": 0
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_pattern_silver": {
        "minecraft:color2": {
          "value": 8
        }
      },
      "minecraft:yellow_tang": {
        "minecraft:color": {
          "value": 4
        },
        "minecraft:color2": {
          "value": 4
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tomato_clown": {
        "minecraft:color": {
          "value": 14
        },
        "minecraft:color2": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_pattern_brown": {
        "minecraft:color2": {
          "value": 12
        }
      },
      "minecraft:tropicalfish_pattern_pink": {
        "minecraft:color2": {
          "value": 6
        }
      },
      "minecraft:tropicalfish_variant_a": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:triggerfish": {
        "minecraft:color": {
          "value": 7
        },
        "minecraft:color2": {
          "value": 0
        },
        "minecraft:mark_variant": {
          "value": 1
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_base_green": {
        "minecraft:color": {
          "value": 13
        }
      },
      "minecraft:tropicalfish_base_blue": {
        "minecraft:color": {
          "value": 11
        }
      },
      "minecraft:tropicalfish_base_brown": {
        "minecraft:color": {
          "value": 12
        }
      },
      "minecraft:tropicalfish_base_cyan": {
        "minecraft:color": {
          "value": 9
        }
      },
      "minecraft:tropicalfish_base_gray": {
        "minecraft:color": {
          "value": 7
        }
      },
      "minecraft:tropicalfish_base_lightgreen": {
        "minecraft:color": {
          "value": 5
        }
      },
      "minecraft:tropicalfish_base_orange": {
        "minecraft:color": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_base_purple": {
        "minecraft:color": {
          "value": 10
        }
      },
      "minecraft:tropicalfish_base_red": {
        "minecraft:color": {
          "value": 14
        }
      },
      "minecraft:tropicalfish_base_silver": {
        "minecraft:color": {
          "value": 8
        }
      },
      "minecraft:tropicalfish_base_white": {
        "minecraft:color": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_base_yellow": {
        "minecraft:color": {
          "value": 4
        }
      },
      "minecraft:tropicalfish_pattern_cyan": {
        "minecraft:color2": {
          "value": 9
        }
      },
      "minecraft:tropicalfish_pattern_blue": {
        "minecraft:color2": {
          "value": 11
        }
      },
      "minecraft:tropicalfish_pattern_gray": {
        "minecraft:color2": {
          "value": 7
        }
      },
      "minecraft:yellowtail_parrot": {
        "minecraft:color": {
          "value": 9
        },
        "minecraft:color2": {
          "value": 4
        },
        "minecraft:mark_variant": {
          "value": 3
        },
        "minecraft:variant": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_pattern_green": {
        "minecraft:color2": {
          "value": 13
        }
      },
      "minecraft:tropicalfish_pattern_magenta": {
        "minecraft:color2": {
          "value": 2
        }
      },
      "minecraft:tropicalfish_pattern_orange": {
        "minecraft:color2": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_pattern_purple": {
        "minecraft:color2": {
          "value": 10
        }
      },
      "minecraft:tropicalfish_variant_pattern_4": {
        "minecraft:mark_variant": {
          "value": 3
        }
      },
      "minecraft:tropicalfish_pattern_white": {
        "minecraft:color2": {
          "value": 0
        }
      },
      "minecraft:tropicalfish_pattern_yellow": {
        "minecraft:color2": {
          "value": 4
        }
      },
      "minecraft:tropicalfish_variant_b": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "minecraft:tropicalfish_variant_pattern_3": {
        "minecraft:mark_variant": {
          "value": 2
        }
      }
    },
    "events": {
      "minecraft:become_red_snapper": {
        "add": {
          "component_groups": [
            "minecraft:red_snapper"
          ]
        }
      },
      "minecraft:become_anenonme": {
        "add": {
          "component_groups": [
            "minecraft:anenonme"
          ]
        }
      },
      "minecraft:become_cichlid": {
        "add": {
          "component_groups": [
            "minecraft:cichlid"
          ]
        }
      },
      "minecraft:become_black_tang": {
        "add": {
          "component_groups": [
            "minecraft:black_tang"
          ]
        }
      },
      "minecraft:become_blue_dory": {
        "add": {
          "component_groups": [
            "minecraft:blue_dory"
          ]
        }
      },
      "minecraft:become_dog_fish": {
        "add": {
          "component_groups": [
            "minecraft:dog_fish"
          ]
        }
      },
      "minecraft:become_triggerfish": {
        "add": {
          "component_groups": [
            "minecraft:triggerfish"
          ]
        }
      },
      "minecraft:become_butterfly_fish": {
        "add": {
          "component_groups": [
            "minecraft:butterfly_fish"
          ]
        }
      },
      "minecraft:become_cc_betta": {
        "add": {
          "component_groups": [
            "minecraft:cc_betta"
          ]
        }
      },
      "minecraft:become_clownfish": {
        "add": {
          "component_groups": [
            "minecraft:clownfish"
          ]
        }
      },
      "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_queen_angel_fish": {
        "add": {
          "component_groups": [
            "minecraft:queen_angel_fish"
          ]
        }
      },
      "minecraft:become_parrot_fish": {
        "add": {
          "component_groups": [
            "minecraft:parrot_fish"
          ]
        }
      },
      "minecraft:become_tomato_clown": {
        "add": {
          "component_groups": [
            "minecraft:tomato_clown"
          ]
        }
      },
      "minecraft:become_red_cichlid": {
        "add": {
          "component_groups": [
            "minecraft:red_cichlid"
          ]
        }
      },
      "minecraft:become_red_lipped_benny": {
        "add": {
          "component_groups": [
            "minecraft:red_lipped_benny"
          ]
        }
      },
      "minecraft:become_threadfin": {
        "add": {
          "component_groups": [
            "minecraft:threadfin"
          ]
        }
      },
      "minecraft:become_yellow_tail_parrot": {
        "add": {
          "component_groups": [
            "minecraft:yellow_tail_parrot"
          ]
        }
      },
      "minecraft:become_yellow_tang": {
        "add": {
          "component_groups": [
            "minecraft:yellow_tang"
          ]
        }
      },
      "minecraft:entity_spawned": {
        "sequence": [
          {
            "add": {
              "component_groups": [
                "adult"
              ]
            }
          },
          {
            "randomize": [
              {
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_a"
                  ]
                },
                "weight": 1
              },
              {
                "add": {
                  "component_groups": [
                    "minecraft:tropicalfish_variant_b"
                  ]
                },
                "weight": 1
              }
            ]
          },
          {
            "randomize": [
              {
                "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"
                  ]
                },
                "weight": 1
              }
            ]
          },
          {
            "randomize": [
              {
                "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"
                  ]
                },
                "weight": 1
              }
            ]
          },
          {
            "randomize": [
              {
                "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"
                  ]
                },
                "weight": 1
              }
            ]
          }
        ]
      }
    }
  }
}