[GeckoLib] How to play an item animation on key press?

Started by Ksanaks1337 on

Topic category: Help with modding (Java Edition)

Last seen on 20:43, 21. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[GeckoLib] How to play an item animation on key press?
Wed, 07/17/2024 - 12:43 (edited)

So I made a 3D model of a gun in Blockbench with GeckoLib, added a reload animation, imported everything to Mcreator and the model and the animation work, but I can't figure out how to make the animation play when the player is pressing a keybind. I made a procedure for a keybind(on the screenshot), but when I press the keybind nothing happens and the animation doesn't work. What am I doing wrong?

https://imgur.com/a/Hf8nEne

 

Edited by Ksanaks1337 on Wed, 07/17/2024 - 12:43
Last seen on 22:04, 6. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
instead of provided…
Wed, 07/17/2024 - 13:21

instead of provided itemstack use item in main hand of event target entity