{
  "format_version": "1.19.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "tsu_morph:tropicalfish_morph",
      "materials": {
        "default": "tsu_multitexture_alpha"
      },
      "textures": {
        "a_base1": "textures/tsu/morph/fish/a/a_base1",
        "a_base2": "textures/tsu/morph/fish/a/a_base2",
        "a_base3": "textures/tsu/morph/fish/a/a_base3",
        "a_base4": "textures/tsu/morph/fish/a/a_base4",
        "a_base5": "textures/tsu/morph/fish/a/a_base5",
        "a_base6": "textures/tsu/morph/fish/a/a_base6",

        "a1": "textures/tsu/morph/fish/a/a1",
        "a2": "textures/tsu/morph/fish/a/a2",
        "a3": "textures/tsu/morph/fish/a/a3",
        "a4": "textures/tsu/morph/fish/a/a4",
        "a5": "textures/tsu/morph/fish/a/a5",
        "a6": "textures/tsu/morph/fish/a/a6",

        "b_base1": "textures/tsu/morph/fish/b/b_base1",
        "b_base2": "textures/tsu/morph/fish/b/b_base2",
        "b_base3": "textures/tsu/morph/fish/b/b_base3",
        "b_base4": "textures/tsu/morph/fish/b/b_base4",
        "b_base5": "textures/tsu/morph/fish/b/b_base5",
        "b_base6": "textures/tsu/morph/fish/b/b_base6",

        "b1": "textures/tsu/morph/fish/b/b1",
        "b2": "textures/tsu/morph/fish/b/b2",
        "b3": "textures/tsu/morph/fish/b/b3",
        "b4": "textures/tsu/morph/fish/b/b4",
        "b5": "textures/tsu/morph/fish/b/b5",
        "b6": "textures/tsu/morph/fish/b/b6"
      },
      "geometry": {
        "default": "geometry.tsu_morph.tropicalfish_a",
        "typeA": "geometry.tsu_morph.tropicalfish_a",
        "typeB": "geometry.tsu_morph.tropicalfish_b"
      },
      "animations": {
        "flop": "animation.tsu_morph.tropicalfish.flop",
        "swim": "animation.tsu_morph.tropicalfish.swim",
        "hurt_sounds": "controller.animation.tsu_morph.hurt_sounds"
      },
      "sound_effects": {
        "hurt": "mob.fish.hurt"
      },
      "scripts": {
        "initialize": [
          "variable.type = math.random_integer(0,1);",
          "variable.base = math.random_integer(0,5);",
          "variable.pattern = math.random_integer(0,5);",
          "v.step_interval = 0.15;"
        ],
        "pre_animation": ["v.display_fp = (c.is_first_person || q.distance_from_camera < 2.0) && !q.is_in_ui && q.is_local_player;"],
        "animate": [
          {
            "flop": "!query.is_in_water"
          },
          {
            "swim": "query.is_in_water"
          },
          "hurt_sounds"
        ]
      },
      "render_controllers": [
        {
          "controller.render.tsu_morph.tropicalfish": "!v.display_fp"
        }
      ]
    }
  }
}
