DrNickenstein Posted February 12, 2023 Posted February 12, 2023 I'm trying to add a custom use animation to my item and I read about it on the forge wiki so I implemented stuff as it says and it's not working, the method applyForgeHandTransform isn't getting called and on the wiki it is not specified when it should be called, and to be completely honest I didn't really understand what all of this is and how it actually works so I apologize if I made an obvious mistake. There is not third person animation for now, so this is for first person. This is the code in my item class: https://gist.github.com/DrNickenstein/5d0487ee21ef3723e6ef3959ff00ee86 Quote
ChampionAsh5357 Posted February 13, 2023 Posted February 13, 2023 You can't perform an equality check on stacks. They are mutable and always changing, so they are unlikely to be the same. You should check if the item in the stack matches your item (via ItemStack#getItem). Quote
DrNickenstein Posted February 13, 2023 Author Posted February 13, 2023 29 minutes ago, ChampionAsh5357 said: You can't perform an equality check on stacks. They are mutable and always changing, so they are unlikely to be the same. You should check if the item in the stack matches your item (via ItemStack#getItem). Hmmm what you said definitely makes sense but that wasn't the problem. After checking the code a ton of times I just said fuck it and copy pasted it from the wiki which creates the anonymous class implemeting the interface directly in the .accept() method and it just works now Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.