Jump to content

[1.19.3] Custom item animations?


DrNickenstein

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.