-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to animate armor models in HumanoidArmorLayer #1541
Add a way to animate armor models in HumanoidArmorLayer #1541
Conversation
|
I never had issues animating humanoid armor layers using the Forge hook, did something change recently that caused issues? Remember the method to swap the model from the vanilla model to the modded model takes in the original as a parameter; there is a method I recall using to copy the armor properties over from the old model. See this test mod for reference. |
copying properties isnt my problem here: getting that to work is straightforward enough. I want to have pieces of the armor animate on their own terms. For example, take the armor model displayed below: (amphibious armor from the Betweenlands) |
patches/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java.patch
Outdated
Show resolved
Hide resolved
🚀 This PR has been released as NeoForge version |
Hello again!
I have a custom armor model that I'm rendering via
HumanoidArmorLayer
, as it should be. The armor model has some extra bits that I would like to animate to sway, similar to how the player's arms do. There's one small issue though:HumanoidArmorLayer
doesn't callsetupAnim
orprepareMobModel
anywhere, making it impossible to do so. I don't really want to handle this through a custom layer as everything else works perfectly, so I drafted up this PR to fix my issue.This PR adds a new method to
IClientItemExtensions
that allows for calling animation methods in the armor model if desired. This is called right before the model is rendered, meaning you can manipulate parts of the model (moving or rotating) as you so desire.Please let me know if anything needs changing or if my documentation needs updating. I'll fix it as soon as I can. Thanks for looking over this!