Jump to content

[1.6.2] Unwanted animation when damaging a stack


khlorghaal

Recommended Posts

When a held item is damaged using ItemStack.damageItem() or ItemStack.setItemDamage it does the animation that happens when you change your active item (ie mouse wheel scrolling), and it looks terrible when done continually. Which is huge a problem for me as many of my items make use of damage value for a continually changing variable that i wish to display to the player.

 

Is there any way to stop this animation? I notice on completeing a dig with a tool it doesnt happen.

Link to comment
Share on other sites

My mod does the same thing the damage values. solved the animation thing by making it a coremod and editing updateEquipedItem() ("Equipped" was spelled wrong, if i remember correctly) in ItemRenderer.class (not sure if it was in that class, i don't have my laptop with me right now so i can't check). if you find a better way of keeping track of the damage, let me know!

Link to comment
Share on other sites

I could just make another NBT for all my items that do this and use an IItemRenderer to render the bar. I could display more than one bar or change it's color that way.

 

But then I would have to make an inventory renderer for all of those items, which would suck, maybe not as bad if you can register more than one item renderer for an item. Even then I could just make all my item renders extend a single super that does it... I'll see how well I can get it to work later today.

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.

Announcements



×
×
  • Create New...

Important Information

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