Player Animator is a plugin that allows you to animate the player model using smooth keyframe (json) animations created with blockbench, blender or even by hand. This is done though the help of the playerAnimator library.
Example of a player animation:
How to use:
First, you will need to use blockbench, animate a template player model and extract the .json animation. The animation in the first example is made with blender, but you can use the geckolib plugin in blockbench like I did to make the second example.
Now that you have the animation file, it will need to be placed here:
Once you have placed your animation in the correct folder, you need to make an empty procedure and select the event shown below. The procedure does not need any further inspection.
Now, you are ready to use your animations! All you will need to do is include the procedure block provided by the plugin (and have the playerAnimator library enabled in workspace settings).
Potential issues when using the plugin:
"I can't get the animation parts to work correctly!" -You can find the official bbmodel here
"The game keeps crashing when I try use the animation!" -You either didn't place the file in the right place, or you renamed the animation after exporting it. Don't do that.
"I'm getting a build error!" -You didn't name the SetupAnimations procedure correctly, or your use of the procedure block was simply not accounted for.
"The animation won't play!" -None of the entities in your event are players, therefore it has nothing to play for.
Comments
i keep getting [modloading-worker-0/FATAL] [mixin/]: Mixin apply failed playerAnimator-common.mixins.json:firstPerson.LivingEntityRendererMixin -> net.minecraft.client.renderer.entity.LivingEntityRenderer: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow field f_115291_ was not located in the target class net.minecraft.client.renderer.entity.LivingEntityRenderer. Using refmap player-animation-lib-minecraft_common-refmap.json error, please help
Sure, i've done this before.
You need to create a variable for the player. for example:
let's say you want your running animation to trigger when player is sprinting.
You create a variable for sprinting. Then you create a tick event that checks if the player is sprinting and if this variable is set to false. Then set it to true. this will trigger the running animation just once.
Nerdy, could you in the next update add the "query.rotation_to_camera" functions? So that animations start where the players head already is. I'm using real camera and the animation just snaps to the vector 0 0 0 and it's nauseating. Ik not a you problem, but I would love if you added it!
stuff like: query.rotation_to_camera(1) - query.body_y_rotation
keeps giving me a error saying stuff like "Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state"