This commit is contained in:
Bishop 2026-07-31 21:08:45 -05:00
parent 3a18fb16c2
commit 65ac7b451d

View file

@ -586,6 +586,26 @@ fun resetAnimator(player: Player) {
player.animator.animate(Animation(-1, Animator.Priority.VERY_HIGH))
}
/**
* Sets a player's render animation to a given animation.
* @param player the player whose render animation to set
* @param animation the ID of the render animation to set
*/
fun renderAnimation(player: Player, animation: Int) {
player.appearance.setAnimations(Animation(animation))
player.appearance.sync()
}
/**
* Resets a player's render animation to the default.
* @param player the player whose render animation to reset
*/
fun resetRenderAnimation(player: Player) {
player.appearance.setDefaultAnimations()
player.appearance.setAnimations()
player.appearance.sync()
}
/**
* Get the number of ticks an animation lasts
* @param animation the Animation object to check the duration of