{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:player",
      "materials": {
        "default": "entity_alphatest",
        "cape": "entity_alphatest",
        "animated": "player_animated",
        "cyber_mech": "slime_outer"
      },
      "textures": {
        "default": "textures/entity/steve",
        "cape": "textures/entity/cape_invisible",
        "cyber_mech": "textures/entity/vehicles/cyber_mech",

        "electric_pickaxe": "textures/models/electric_pickaxe",
        "gauntlets": "textures/models/gauntlets",
        "hammer": "textures/models/hammer",
        "saber_laser": "textures/models/saber_laser",
        "teleporter": "textures/models/teleporter"

      },
      "geometry": {
        "default": "geometry.humanoid.custom",
        "cape": "geometry.cape",
        "cyber_mech": "geometry.cyber_mech_helmet",

        "electric_pickaxe": "geometry.electric_pickaxe",
        "gauntlets": "geometry.gauntlets",
        "hammer": "geometry.hammer",
        "saber_laser": "geometry.saber_laser",
        "teleporter": "geometry.teleporter",
        "laser_glasses": "geometry.laser_glasses_player"
      },
      "scripts": {
        "scale": "0.9375",
        "initialize": [
          "variable.is_holding_right = 0.0;",
          "variable.is_blinking = 0.0;",
          "variable.last_blink_time = 0.0;",
          "variable.hand_bob = 0.0;"
        ],
        "pre_animation": [
          "variable.helmet_layer_visible = 1.0;",
          "variable.leg_layer_visible = 1.0;",
          "variable.boot_layer_visible = 1.0;",
          "variable.chest_layer_visible = 1.0;",
          "variable.attack_body_rot_y = Math.sin(360*Math.sqrt(variable.attack_time)) * 5.0;",
          "variable.tcos0 = (math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;",
          "variable.first_person_rotation_factor = math.sin((1 - variable.attack_time) * 180.0);",
          "variable.hand_bob = query.life_time < 0.01 ? 0.0 : variable.hand_bob + ((query.is_on_ground && query.is_alive ? math.clamp(math.sqrt(math.pow(query.position_delta(0), 2.0) + math.pow(query.position_delta(2), 2.0)), 0.0, 0.1) : 0.0) - variable.hand_bob) * 0.02;",

          "variable.map_angle = math.clamp(1 - variable.player_x_rotation / 45.1, 0.0, 1.0);",
          "variable.item_use_normalized = query.main_hand_item_use_duration / query.main_hand_item_max_duration;",
          "v.holding_3d = q.get_equipped_item_name(0, 1) == 'electric_pickaxe' || q.get_equipped_item_name(0, 1) == 'gauntlets' || q.get_equipped_item_name(0, 1) == 'hammer' || q.get_equipped_item_name(0, 1) == 'saber_laser';"
        ],
        "animate": [
          "root",

          //fp hold anims 
          { "weapon1": "v.is_first_person && (!q.is_saddled && q.get_equipped_item_name(0, 1) == 'electric_pickaxe' || q.get_equipped_item_name(0, 1) == 'hammer')"},
          { "weapon2": "v.is_first_person && (!q.is_saddled && q.get_equipped_item_name(0, 1) == 'saber_laser')"},
          { "weapon3": "v.is_first_person && (!q.is_saddled && q.get_equipped_item_name(0, 1) == 'teleporter')"},
          { "weapon4": "v.is_first_person && (!q.is_saddled && q.get_equipped_item_name(0, 1) == 'gauntlets')"},

          //other weapon anims
          { "gauntlets_ac": "q.get_equipped_item_name(0, 1) == 'gauntlets'"},
          { "saber_laser_ac": "q.get_equipped_item_name(0, 1) == 'saber_laser'"},
          { "teleporter_ac": "q.get_equipped_item_name(0, 1) == 'teleporter'"},
          { "electric_pickaxe_ac": "q.get_equipped_item_name(0, 1) == 'electric_pickaxe'"},
          { "hammer_ac": "q.get_equipped_item_name(0, 1) == 'hammer'"},

          { "laser_glasses_charge": "q.is_illager_captain" },

          {"cyber_mech": "q.is_saddled && !q.is_in_ui"}
        ]
      },
      "animations": {
        "root": "controller.animation.player.root",
        "base_controller": "controller.animation.player.base",
        "hudplayer":  "controller.animation.player.hudplayer",
        "humanoid_base_pose": "animation.humanoid.base_pose",
        "look_at_target": "controller.animation.humanoid.look_at_target",
        "look_at_target_ui": "animation.player.look_at_target.ui",
        "look_at_target_default": "animation.humanoid.look_at_target.default",
        "look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
        "look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
        "look_at_target_inverted": "animation.player.look_at_target.inverted",
        "cape": "animation.player.cape",
        "move.arms": "animation.player.move.arms",
        "move.legs": "animation.player.move.legs",
        "swimming": "animation.player.swim",
        "swimming.legs": "animation.player.swim.legs",
        "riding.arms": "animation.player.riding.arms",
        "riding.legs": "animation.player.riding.legs",
        "holding": "animation.player.holding",
        "brandish_spear": "animation.humanoid.brandish_spear",
        "holding_spyglass": "animation.humanoid.holding_spyglass",
        "charging": "animation.humanoid.charging",
        "attack.positions": "animation.player.attack.positions",
        "attack.rotations": "animation.player.attack.rotations",
        "sneaking": "animation.player.sneaking",
        "bob": "animation.player.bob",
        "damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
        "bow_and_arrow": "animation.humanoid.bow_and_arrow",
        "use_item_progress": "animation.humanoid.use_item_progress",
        "skeleton_attack": "animation.skeleton.attack",
        "sleeping": "animation.player.sleeping",
        "first_person_base_pose": "animation.player.first_person.base_pose",
        "first_person_empty_hand": "animation.player.first_person.empty_hand",
        "first_person_swap_item": "animation.player.first_person.swap_item",
        "first_person_attack_controller": "controller.animation.player.first_person_attack",
        "first_person_attack_rotation": "animation.player.first_person.attack_rotation",
        "first_person_vr_attack_rotation": "animation.player.first_person.vr_attack_rotation",
        "first_person_walk": "animation.player.first_person.walk",
        "first_person_map_controller": "controller.animation.player.first_person_map",
        "first_person_map_hold": "animation.player.first_person.map_hold",
        "first_person_map_hold_attack": "animation.player.first_person.map_hold_attack",
        "first_person_map_hold_off_hand": "animation.player.first_person.map_hold_off_hand",
        "first_person_map_hold_main_hand": "animation.player.first_person.map_hold_main_hand",
        "first_person_crossbow_equipped": "animation.player.first_person.crossbow_equipped",
        "third_person_crossbow_equipped": "animation.player.crossbow_equipped",
        "third_person_bow_equipped": "animation.player.bow_equipped",
        "crossbow_hold": "animation.player.crossbow_hold",
        "crossbow_controller": "controller.animation.player.crossbow",
        "shield_block_main_hand": "animation.player.shield_block_main_hand",
        "shield_block_off_hand": "animation.player.shield_block_off_hand",
        "blink": "controller.animation.persona.blink",


        "cyber_mech": "animation.player.cyber_mech",


        "weapon1": "animation.weapon.fp1",
        "weapon2": "animation.weapon.fp2",
        "weapon3": "animation.weapon.fp3",
        "weapon4": "animation.weapon.fp4",
        
        "electric_pickaxe": "animation.electric_pickaxe.attack",
        "electric_pickaxe_fp": "animation.electric_pickaxe.attack_fp",
        "electric_pickaxe_ac": "controller.animation.electric_pickaxe",

        "gauntlets_1": "animation.gauntlets.attack1",
        "gauntlets_2": "animation.gauntlets.attack2",
        "gauntlets_particle_1": "animation.gauntlets.particles1",
        "gauntlets_particle_2": "animation.gauntlets.particles2",
        "gauntlets_1_fp": "animation.gauntlets.attack1_fp",
        "gauntlets_2_fp": "animation.gauntlets.attack2_fp",
        "gauntlets_ac": "controller.animation.gauntlets",

        "hammer": "animation.hammer.attack",
        "hammer_fp": "animation.hammer.attack_fp",
        "hammer_ac": "controller.animation.hammer",

        "saber_laser": "animation.saber_laser.hold",
        "saber_laser_1": "animation.saber_laser.attack1",
        "saber_laser_2": "animation.saber_laser.attack2",
        "saber_laser_3": "animation.saber_laser.attack3",
        "saber_laser_1_fp": "animation.saber_laser.attack1_fp",
        "saber_laser_2_fp": "animation.saber_laser.attack2_fp",
        "saber_laser_3_fp": "animation.saber_laser.attack3_fp",
        "saber_laser_ac": "controller.animation.saber_laser",
        
        "teleporter_hold": "animation.teleporter.idle",
        "teleporter": "animation.teleporter.shoot",
        "teleporter_fp": "animation.teleporter.shoot_fp",
        "teleporter_ac": "controller.animation.teleporter",

        "laser_glasses_charge": "animation.laser_glasses.charge",
        "laser_glasses_shoot": "animation.laser_glasses.shoot",
        "laser_glasses_hold": "animation.laser_glasses.hold"
      },
      "particle_effects": {
        "gauntlets_1": "hf:gauntlets_1",
        "gauntlets_2": "hf:gauntlets_2",
        "gauntlets_3": "hf:gauntlets_3",
        "teleporter": "hf:teleporter_1",
        "laser_glasses_1": "hf:laser_glasses_1",
        "laser_glasses_2": "hf:laser_glasses_2",
        "laser_glasses_3": "hf:laser_glasses_3",
        "laser_glasses_4": "hf:laser_glasses_4",
        "laser_glasses_5": "hf:laser_glasses_5", 
        "hammer_1": "hf:hammer_6",
        "hammer_2": "hf:hammer_7"
      },
      "sound_effects": {
        "electric_pickaxe": "weapon.electric_pickaxe.start",
        "hammer": "weapon.hammer.start",
        "gauntlets": "weapon.gauntlets.attack",
        "saber_laser": "weapon.saber_laser.attack",
        "teleporter": "weapon.teleporter.shoot"
      },
      "render_controllers": [
        { "controller.render.player.first_person": "variable.is_first_person" },
        { "controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon" },
        { "controller.render.player.map": "variable.map_face_icon" },
        { "controller.render.player.cyber_mech": "q.is_saddled && !q.is_in_ui" },
        
        { "controller.render.player.electric_pickaxe": "!q.is_saddled && q.get_equipped_item_name(0, 1) == 'electric_pickaxe'" },
        { "controller.render.player.gauntlets": "!q.is_saddled && q.get_equipped_item_name(0, 1) == 'gauntlets'" },
        { "controller.render.player.hammer": "!q.is_saddled && q.get_equipped_item_name(0, 1) == 'hammer'" },
        { "controller.render.player.saber_laser": "!q.is_saddled && q.get_equipped_item_name(0, 1) == 'saber_laser'" },
        { "controller.render.player.teleporter": "!q.is_saddled && q.get_equipped_item_name(0, 1) == 'teleporter'" },
        { "controller.render.player.laser_glasses": "!v.is_paperdoll && q.is_item_name_any('slot.armor.head', 0,  'minecraft:turtle_helmet')" }
      ],
      "enable_attachables": true
    }
  }
}
