I want a animation to only play once in a "While Item in Hand tick" Procedure.

Started by bruinsquad3 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want a animation to only play once in a "While Item in Hand tick" Procedure.

I am fairly new to mcreator but I am trying to make a pull out animation of sorts but only want it to happen when the item is first pulled out. So it doesn't happen again. I don't know how I am able to get it to make sure there is a condition to keep it that way. Because if its self contained it will reset itself when the procedure is run again. I am using the Geckolib Plugin for forge 1.19.2 (Engine Version 2023.2)

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind I figured it out,…
Mon, 08/21/2023 - 20:26

Nevermind I figured it out, All I had to do was use Item NBT Data.

Here was what I did.

If Get NBT Logic Tag "yourtag" of Provided Itemstack = False

   do Set Logic NBT Tag "yourtag" of provided Itemstack to True

          If Item element "your geckolib item" is the item Provided Itemstack then play the animation "your animation name"

 

That seems to get it to work for anyone else in the future who might have something simaler needed to be done.