{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:player",
      "materials": {
        "default": "entity_alphatest",
        "cape": "entity_alphatest",
        "animated": "player_animated"
      },
      "textures": {
        "default": "textures/entity/steve",
        "cape": "textures/entity/cape_invisible",
		"as_huggy": "textures/entity/huggy_wuggy_bd"
      },
      "geometry": {
        "default": "geometry.humanoid.custom",
        "cape": "geometry.cape",
		"as_huggy": "geometry.huggy_wuggy_bd"
      },
      "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;",
		  
		  "variable.is_yourself = query.skin_id == 0;",
		  "variable.is_huggy = query.skin_id == 1;",
		  "variable.random = Math.random_integer(0, 1);",
		  "variable.attack = Math.sin(variable.attack_time * 30.0);",
		  "variable.random2 = math.floor(math.random(0,1));",
		  "variable.dusk_3_block = (q.relative_block_has_any_tag(0,2,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling',' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block','fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block', 'stem_block', 'thinFence_block','unbreakable', 'wall_block', 'water_blocking', 'can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable') && (!q.relative_block_has_any_tag(0,1,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling' ,  ' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block',   'fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block','stem_block','thinFence_block','unbreakable','wall_block','water_blocking','can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable')));",
		  "variable.dusk_2_block = (q.relative_block_has_any_tag(0,1,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling',' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block','fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block', 'stem_block', 'thinFence_block','unbreakable', 'wall_block', 'water_blocking', 'can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable'));",
		  "variable.nodusk_3_block = (!q.relative_block_has_any_tag(0,2,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling',' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block','fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block', 'stem_block', 'thinFence_block','unbreakable','wall_block','water_blocking', 'can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable') && (!q.relative_block_has_any_tag(0,1,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling' ,  ' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block',   'fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block','stem_block','thinFence_block','unbreakable','wall_block','water_blocking','can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable')));",
		  "variable.nodusk_2_block = !q.relative_block_has_any_tag(0,1,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling',' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block','fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block', 'stem_block', 'thinFence_block','unbreakable','wall_block','water_blocking', 'can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable');",
		  "variable.nodusk_all_block = (!q.relative_block_has_any_tag(0,2,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling',' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block','fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block', 'stem_block', 'thinFence_block','unbreakable', 'wall_block', 'water_blocking', 'can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable')) || (!q.relative_block_has_any_tag(0,1,0,'wood','metal','stone','plant','dirt', 'grass','concrete','sand','gravel', 'snow','mob_spawner','diamond_pick_diggable','gold_pick_diggable','iron_pick_diggable','stone_pick_diggable','wood_pick_diggable','can_be_broken_from_falling' ,  ' can_hurt_and_break_item','button_block', 'container_block', 'crafting_block', 'crop_block', 'door_block', 'empty','fence_block',   'fenceGate_block', 'flammable','heavy','hot','hurtable_block','interactive_block','motion_blocking_block','rail_block','signal_source', 'slab_block', 'solid','solid_blocking_block','stair_block','stem_block','thinFence_block','unbreakable','wall_block','water_blocking','can_be','acacia', 'birch', 'dark_oak', 'log', 'oak', 'spruce', 'jungle','lush_plants_replaceable','azalea_log_replaceable'));"
		],
        "animate": [
		  {"root": "variable.is_yourself"},
		  {"general": "variable.is_huggy && !variable.is_first_person"},
		  {"general_leg": "variable.is_huggy && !variable.is_first_person"},
		  {"huggy.general_first": "variable.is_huggy && variable.is_first_person" },
		  {"look_out": "variable.is_huggy && !variable.is_first_person"},
		  {"crouch_leg": "variable.is_huggy && !variable.is_first_person"},
		  {"huggy.first_person_root": "variable.is_huggy && variable.is_first_person"},
		  {"mouth": "variable.is_huggy && !variable.is_first_person" }
        ]
      },
      "animations": {
		"huggy.first_person": "animation.huggy_wuggy_player.first_person_root",
		
		"huggy_wuggy_player.moving_first": "animation.huggy_wuggy_player.moving_first",
		"huggy_wuggy_player.running_first": "animation.huggy_wuggy_player.running_first",
		"huggy_wuggy_player.general_first": "animation.huggy_wuggy_player.general_first",
		"huggy_wuggy_player.dusk_first": "animation.huggy_wuggy_player.dusk_first",
		"huggy_wuggy_player.dusk2_first": "animation.huggy_wuggy_player.dusk2_first",
		"huggy_wuggy_player.vent_move_first": "animation.huggy_wuggy_player.vent_move_first",
		"grab_success_down_first": "animation.huggy_wuggy_player.grab_success_down_first",
		"attack1_first": "animation.huggy_wuggy_player.attack1_first",
		"attack2_first": "animation.huggy_wuggy_player.attack2_first",
		
		"moving": "animation.huggy_wuggy_player.moving",
		"moving_leg": "animation.huggy_wuggy_player.moving_leg",
		"running": "animation.huggy_wuggy_player.running",
		"running_leg": "animation.huggy_wuggy_player.running_leg",
		"huggy_wuggy_player_general": "animation.huggy_wuggy_player.general",
		"huggy_wuggy_player_general_leg": "animation.huggy_wuggy_player.general_leg",
		"dusk": "animation.huggy_wuggy_player.dusk",
		"dusk2": "animation.huggy_wuggy_player.dusk2",
		"dusk_leg": "animation.huggy_wuggy_player.dusk_leg",
		"dusk2_leg": "animation.huggy_wuggy_player.dusk2_leg",
		"attack1": "animation.huggy_wuggy_player.attack1",
		"attack2": "animation.huggy_wuggy_player.attack2",
		"play_dead": "animation.huggy_wuggy_player.play_dead",
		"play_dead_leg": "animation.huggy_wuggy_player.play_dead_leg",
		"become_statue": "animation.huggy_wuggy_player.become_statue",
		"become_statue_leg": "animation.huggy_wuggy_player.become_statue_leg",
		"dead": "animation.huggy_wuggy_player.dead",
		"dead_leg": "animation.huggy_wuggy_player.dead_leg",
		"grab": "animation.huggy_wuggy_player.grab",
		"grab2": "animation.huggy_wuggy_player.grab2",
		"grab_success": "animation.huggy_wuggy_player.grab_success",
		"grab_success_down": "animation.huggy_wuggy_player.grab_success_down",
		"grab_success_down_leg": "animation.huggy_wuggy_player.grab_success_down_leg",
		"look_at": "animation.huggy_wuggy_player.look_at",
		"look_at_off": "animation.huggy_wuggy_player.look_at_off",
		"vent_move": "animation.huggy_wuggy_player.vent_move",
		"vent_move_sound": "animation.huggy_wuggy_player.vent_move_sound",
	    "vent_move_sound_fast": "animation.huggy_wuggy_player.vent_move_sound_fast",
		"vent_move_leg": "animation.huggy_wuggy_player.vent_move_leg",
		"falling": "animation.huggy_wuggy_player.falling",
		"landing": "animation.huggy_wuggy_player.landing",
		"landing_leg": "animation.huggy_wuggy_player.landing_leg",
		"other_leg": "animation.huggy_wuggy_player.other_leg",
		"other_leg2": "animation.huggy_wuggy_player.other_leg2",
		"passive_mode": "animation.huggy_wuggy_player.passive_mode",
		"hunt_mode": "animation.huggy_wuggy_player.hunt_mode",
		
		"look_out": "controller.animation.huggy_wuggy_player.look_out",
		"mouth": "controller.animation.huggy_wuggy_player.mouth",
		"general": "controller.animation.huggy_wuggy_player.general",
		"general_leg": "controller.animation.huggy_wuggy_player.general_leg",
		"crouch_leg": "controller.animation.huggy_wuggy_player.crouch_leg",
		"huggy.first_person_root": "controller.animation.huggy_wuggy_player.first_person_root",
		"huggy.general_first": "controller.animation.huggy_wuggy_player.general_first",
		
        "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",
        
        "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"
      },
	  "sound_effects": {
		"eat": "mob.huggy_wuggy.jumpscare",
		"attack": "mob.huggy_wuggy.attack",
		"vent_stepping": "mob.huggy_wuggy.vent_step"
	  },
      "render_controllers": [
		{ "controller.render.player.is_huggy": "variable.is_huggy" },
		
        { "controller.render.player.first_person": "variable.is_first_person && variable.is_yourself" },
        { "controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon && variable.is_yourself" },
        { "controller.render.player.map": "variable.map_face_icon && variable.is_yourself" }
      ],
      "enable_attachables": true
    }
  }
}
