{
  "format_version": "1.19.0",
  "minecraft:attachable": {
    "description": {
      "identifier": "tsu_morph:zoglin_morph",
      "materials": {
        "default": "entity_alphatest"
      },
      "textures": {
        "default": "textures/entity/zoglin/zoglin"
      },
      "geometry": {
        "default": "geometry.tsu_morph.hoglin"
      },
      "animations": {
        "walk": "animation.tsu_morph.hoglin.walk",
        "look_at_target": "animation.tsu_morph.look_at_target",
        "attack": "animation.tsu_morph.hoglin.attack",
        "attack_controller": "controller.animation.tsu_morph.attachable_attack",

        "hurt_sounds": "controller.animation.tsu_morph.hurt_sounds",
        "step_sounds": "controller.animation.tsu_morph.step_sounds",
        "idle_sounds": "animation.tsu_morph.idle_sounds"
      },
      "sound_effects": {
        "step": "mob.zoglin.step",
        "hurt": "mob.zoglin.hurt",
        "idle": "mob.zoglin.idle"
      },
      "scripts": {
        "initialize": [
          "v.step_interval = 0.15;",
          "v.attack_time = 0;"
        ],
        "pre_animation": [
          "v.is_attacking = q.player_level == 5678 ? 1 : 0;",
          "v.attack_time = math.lerp(v.attack_time, v.is_attacking, q.delta_time * 10);",
          "v.gliding_speed_value = q.is_gliding ? 0.5 : 1;",
          "v.display_fp = c.is_first_person && !q.is_in_ui && q.is_local_player;",
          "variable.tcos_right_side = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;",
          "variable.tcos_left_side = -variable.tcos_right_side;",
          "variable.attack_head_rot =  Math.sin(variable.attack_time * 180.0) * -37.3;"
        ],
        "animate": [
          {
            "walk": "q.modified_move_speed * 0.7"
          },
          "look_at_target",
          "attack_controller",
          "hurt_sounds",
          "step_sounds",
          "idle_sounds"
        ]
      },
      "render_controllers": [
        {
          "controller.render.tsu_morph.default": "!v.display_fp"
        }
      ]
    }
  }
}