//This JSON was modified by Eroded Potato (@ErodedPotato), Netongas NG (@netongas_ng), AgentMindStorm (@agentms_), LateLag (@LateLagMC), and Rainvay_ZCYF (@ZouChenyunfei). Please do not use this document without permission.
{
  "format_version": "1.8.0",
  "animations": {
    "animation.humanoid.attack.rotations": {
      "loop": true,
      "bones": {
        "body": {
          "rotation": [ 0.0, "math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46", 0.0 ]
        },
        "leftarm": {
          "rotation": [ "math.sin(math.sqrt(variable.attack_time) * 360.0) * 11.46", 0.0, 0.0 ]
        },
        "rightarm": {
          "rotation": [ "math.sin(1.0 - math.pow(1.0 - variable.attack_time, 3.0) * 180.0) * 68.75 - math.sin(variable.attack_time * 180.0) * -(query.target_x_rotation - 40.10) * 0.75", "math.sin(math.sqrt(variable.attack_time) * 360.0) * 22.92", "math.sin(variable.attack_time * 180.0) * -22.92" ]
        }
      }
    },
    "animation.humanoid.base_pose": {
      "loop": true,
      "bones": {
        "leftarm": {
          "relative_to": {
            "rotation": "entity"
          }
        },
        "rightarm": {
          "relative_to": {
            "rotation": "entity"
          }
        },
        "waist": {
          "rotation": [ 0.0, 0.0, "variable.is_upside_down = 0.0;" ]
        }
      }
    },
    "animation.humanoid.bob": {
      "loop": true,
      "bones": {
        "leftarm": {
          "rotation": [ "-math.sin(query.life_time * 76.776372) * 2.865", 0.0, "-(math.cos(query.life_time * 103.13244) * 2.865 + 2.865)" ]
        },
        "rightarm": {
          "rotation": [ "math.sin(query.life_time * 76.776372) * 2.865", 0.0, "math.cos(query.life_time * 103.13244) * 2.865 + 2.865" ]
        }
      }
    },
    "animation.humanoid.bow_and_arrow": {
      "loop": true,
      "bones": {
        "leftarm": {
          "rotation": [ "q.is_item_name_any('slot.weapon.mainhand', 'minecraft:bow') ? query.target_x_rotation - 90.0 - math.sin(query.life_time * 76.776372) * 2.865 - this : 0.0", "q.is_item_name_any('slot.weapon.mainhand', 'minecraft:bow') ? 28.65 + math.clamp(query.target_y_rotation, -45, 45) : 0.0", 0.0 ]
        },
        "rightarm": {
          "rotation": [ "q.is_item_name_any('slot.weapon.mainhand', 'minecraft:bow') ? query.target_x_rotation - 90.0 + math.sin(query.life_time * 76.776372) * 2.865 - this : 0.0", "q.is_item_name_any('slot.weapon.mainhand', 'minecraft:bow') ? -5.73 + math.clamp(query.target_y_rotation, -45, 45) : 0.0", 0.0 ]
        }
      }
    },
    "animation.humanoid.brandish_spear": {
      "loop": true,
      "bones": {
        "rightarm": {
          "rotation": [ "(variable.swim_amount <= 0.0 ? (this - math.sin(query.life_time * 76.776372) * 2.865) * -0.5 - math.sin(query.life_time * 76.776372) * 2.865 : -this - 9.0) -143.5 - 45.0 * (math.clamp(variable.swim_amount, 0.0, 1.0)) - 22.5 * variable.charge_amount", "-this", "variable.swim_amount <= 0.0 ? -(math.cos(query.life_time * 103.13244) * 2.865 + 2.865) : -this" ]
        }
      }
    },
    "animation.humanoid.brushing": {
      "loop": true,
      "bones": {
        "rightarm": {
          "rotation": [ "(variable.swim_amount <= 0.0 ? -math.sin(query.life_time * 76.776372) * 2.865 : -this - 18.0) -50 + math.clamp(math.lerp(query.target_x_rotation, -45.0, math.clamp(variable.swim_amount + query.is_gliding, 0.0, 1.0)), -43, 14)", "(variable.swim_amount > 0.0 ? -this) + math.clamp(query.target_y_rotation, -37, 43)", "(variable.swim_amount <= 0.0 ? -(math.cos(query.life_time * 103.13244) * 2.865 + 2.865) : -this) + 5.0" ]
        },
        "rightitem": {
          "position": {
            "0.125": {
              "pre": [ 0, 0, 0 ],
              "post": [ 0.75, 0, -3.5 ]
            },
            "0.25": {
              "pre": [ 0.75, 0, -3.5 ],
              "post": [ 0, 0, 0 ]
            },
            "0.375": {
              "pre": [ 0, 0, 0 ],
              "post": [ 0.75, 0, 3.5 ]
            },
            "0.5": {
              "pre": [ 0.75, 0, 3.5 ],
              "post": [ 0, 0, 0 ]
            }
          },
          "rotation": {
            "0.125": {
              "pre": [ 0, 0, 0 ],
              "post": [ 0, -30, 0 ]
            },
            "0.25": {
              "pre": [ 0, -30, 0 ],
              "post": [ 0, 0, 0 ]
            },
            "0.375": {
              "pre": [ 0, 0, 0 ],
              "post": [ 0, 30, 0 ]
            },
            "0.5": {
              "pre": [ 0, 30, 0 ],
              "post": [ 0, 0, 0 ]
            }
          }
        }
      }
    },
    "animation.humanoid.holding_brush": {  //This animation also has item positions hooked into it. The code is nasty, but this is necessary to keep persona skins working. The animations are ordered flat, perpendicular, fishing rod, goat horn, pointed dripstone, brush, and totem of undying.
      "loop": true,
      "bones": {
        "leftitem": {
          "rotation": [
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? 13.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? 17.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -5.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 13.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? 22.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? 13.0 : 0.0)
            ",
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? 14.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? -10.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 2.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 14.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? -29.3 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? -19.0 : 0.0)
            ",
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? -11.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? 258.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 4.75 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 98.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? -13.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? 1.0 : 0.0)
            "
          ],
          "position": [
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? 0.9 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? -3.93 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 1.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 1.15 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? -5.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? -0.59 : 0.0)
            ",
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? 0.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? -3.6 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -3.7 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? -5.05 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? -0.03 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? -0.09 : 0.0)
            ",
            "
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? -0.6 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? 0.0 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -1.6 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 5.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? -0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? -1.55 : 0.0)
            "
          ],
          "scale":
            "
              1.0 +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:arrow', 'minecraft:firework_rocket', 'minecraft:filled_map', 'minecraft:nautilus_shell') ? 0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:banner') ? 0.3 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:pointed_dripstone') ? 0.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:brush') ? 0.6 : 0.0) +
              (q.is_item_name_any('slot.weapon.offhand', 'minecraft:totem_of_undying') ? 0.1 : 0.0)
            "
        },
        "rightitem": {
          "rotation": [
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? 18.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? 17.5 - 18.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -5.0 - 18.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? 13.0 - 18.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? 0.0 - 18.5 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? 22.0 - 18.5 : 0.0)
            ",
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? -2.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? -10.0 + 2.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 2.0 + 2.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? 14.5 + 2.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? 2.0 + 2.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? -29.3 + 2.4 : 0.0)
            ",
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? 3.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? 78.0 - 3.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 4.75 - 3.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? 168.5 - 3.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? -10.0 - 3.85 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? -13.0 - 3.85 : 0.0)
            "
          ],
          "position": [
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? -0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? 3.4 + 0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? 0.26 + 0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? 1.22 + 0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? 0.6 + 0.1 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? -7.75 + 0.1 : 0.0)
            ",
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? 0.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? 1.1 - 0.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -0.5 - 0.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? -3.6 - 0.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? -0.65 - 0.8 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? -0.68 - 0.8 : 0.0)
            ",
            "
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? -1.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? -0.5 + 1.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -1.4 + 1.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? -0.11 + 1.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? -0.47 + 1.4 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? -1.65 + 1.4 : 0.0)
            "
          ],
          "scale":
            "
              1.0 +
              (!q.is_item_name_any('slot.weapon.mainhand', 'minecraft:spyglass', 'minecraft:trident', 'minecraft:shield', 'minecraft:bow', 'minecraft:crossbow') ? -0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:banner') ? 0.3 + 0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:carrot_on_a_stick', 'minecraft:fishing_rod', 'minecraft:warped_fungus_on_a_stick') ? -0.08 + 0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:goat_horn') ? 0.1 + 0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:pointed_dripstone') ? -0.08 + 0.08 : 0.0) +
              (q.is_item_name_any('slot.weapon.mainhand', 'minecraft:brush') ? 0.6 + 0.08 : 0.0)
            "
        }
      }
    },
    "animation.humanoid.holding_spyglass": {
      "loop": true,
      "bones": {
        "rightarm": {
          "rotation": [ "-this - 18.0 + math.clamp(math.lerp(query.target_x_rotation, -45.0, math.clamp(variable.swim_amount + query.is_gliding, 0.0, 1.0)) - 95 + (variable.swim_amount <= 0.0 ? !query.is_gliding * query.is_sneaking * -5.72957 * 2.0 : 0.0), -170, 180)", "-this + math.clamp(query.target_y_rotation - 15, -60, 90)", "-this + 5.0" ]
        }
      }
    },
		"animation.humanoid.look_at_target.gliding" : {
			"loop" : true,
			"bones" : {
				"head" : {
					"rotation" : [ "-45.0", "query.target_y_rotation", 0.0 ]
				}
			}
		},
    "animation.humanoid.look_at_target.swimming": {
      "loop": true,
      "bones": {
        "head": {
          "rotation": [ "math.lerp(query.target_x_rotation, -45.0, math.clamp(variable.swim_amount * 3.0, 0.0, 1.0) * (query.is_swimming + query.is_crawling))", "query.target_y_rotation", 0.0 ]
        }
      }
    },
    "animation.humanoid.move": {
      "loop": true,
      "bones": {
        "leftarm": {
          "rotation": [ "variable.tcos0", 0.0, 0.0 ]
        },
        "leftleg": {
          "rotation": [ "variable.tcos0 * -1.4", -0.1, -0.1 ]
        },
        "rightarm": {
          "rotation": [ "-variable.tcos0", 0.0, 0.0 ]
        },
        "rightleg": {
          "rotation": [ "variable.tcos0 * 1.4", 0.1, 0.1 ]
        },
        "waist": {
          "rotation": [ 0.0, 0.0, "variable.is_upside_down = 0.0;" ]
        }
      }
    },
    "animation.humanoid.tooting_goat_horn": {
      "loop": true,
      "bones": {
        "rightarm": {
          "rotation": [ "-this - 93.0 + math.clamp(math.lerp(query.target_x_rotation, -45.0, math.clamp(variable.swim_amount + query.is_gliding, 0.0, 1.0)) + (variable.swim_amount <= 0.0 ? query.is_sneaking * 5.72957 : 0.0), -43, 14)", "-this + math.clamp(query.target_y_rotation, -37, 43) - 30", "-this + 5.0" ]
        },
        "rightitem": {
          "rotation": [ 0.0, 0.0, -55.0 ],
          "position": [ 2.0, 3.46, 0.97 ]
        }
      }
    },
//      "rightitem": {
//        "rotation": [ 0.0, 0.0, 125.0 ], These values pose the right item with a flat item pose active instead of the unique goat horn item pose.
//        "position": [ 4.4, -0.25, 0.97 ]
//      }
    "animation.humanoid.use_item_progress": {
      "loop": true,
      "bones": {
        "rightarm": {
          "rotation": [ "(variable.swim_amount <= 0.0 ? -60.0 : -this - 78.0) * variable.use_item_startup_progress + variable.use_item_interval_progress * 11.25", "(variable.swim_amount <= 0.0 ? -22.5 : -this - 22.5) * variable.use_item_startup_progress + variable.use_item_interval_progress * 11.25", "(variable.swim_amount <= 0.0 ? -5.625 : -this - 5.625) * variable.use_item_startup_progress + variable.use_item_interval_progress * 11.25" ]
        }
      }
    }
  }
}
