NBT Item re-equip animation

Started by ShrimpyUsesGrammarly on

Topic category: Help with MCreator software

NBT Item re-equip animation
Thu, 10/30/2025 - 20:38 (edited)

When using an item in inventory tick procedure and updating nbts within it, when i open my inventory with the item in hand, it shows the item bobbing up and down constantly, how do i stop this from happening?

Its really noticeable, and i wish there was a way to disable it.

 

Edited by ShrimpyUsesGrammarly on Thu, 10/30/2025 - 20:38
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you show the procedure?…
Wed, 10/29/2025 - 23:48

can you show the procedure? and are you talking about this?

Yes that is what im…
Thu, 10/30/2025 - 09:56

Yes that is what im experiencing! sorry for the lack of clarification

Okay i fixed it!! if anyone…
Thu, 10/30/2025 - 20:27

Okay i fixed it!! if anyone else has this problem, i fixed it by adding an if statement and checking if the world is clientside first.

ok nevermind im at a loss,…
Thu, 10/30/2025 - 20:44

ok nevermind im at a loss, the visual bug is fixed but the nbts dont function correctly, presumable because im just changing them on the client now

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i'm really not sure you can…
Fri, 10/31/2025 - 13:02

i'm really not sure you can.. 

i mean mending even does it,,

its okay dont worry about it…
Fri, 10/31/2025 - 17:20

its okay dont worry about it, ill find a way eventually!!

i believe a fix for this is…
Fri, 10/31/2025 - 17:59

i believe a fix for this is to add this into the item class for now!

 

@Override

public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {

   return !ItemStack.isSameItem(oldStack, newStack) || slotChanged;

}