How do you animate a custom geckolib entity through commands?

Started by Catnip on

Topic category: Advanced modding

Last seen on 23:48, 1. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you animate a custom geckolib entity through commands?

I would like to create a command that will cause a custom geckolib entity to play a specific animation until you run the command again and change the animation.  I am using MCreator 2023.1 and Nerdy's Geckolib Plugin 4.7.1.  I am currently trying to use a command to change an nbt tag(animation) of the custom entity and having the animation play when a global variable is on(using the "Play returned animation" trigger, as well as keeping "Loop external animations" on for most of the time)  The problem I have is that the entity just stops animating when I turn on the global variable, it even stops playing it's idle animation.  I apologize if I have not explained this very well, I can try to explain a different way or provide additional information if it is needed.

Last seen on 23:48, 1. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
One more thing, please don't…
Wed, 04/05/2023 - 16:31

One more thing, please don't say "start with something simpler" I have been using MCreator for over a year now and have been able to do some complex things with it, I only just recently created an account because I need help with this.  I am willing to do custom code or file editing, if it is at least moderately well explained.

 

Last seen on 00:42, 10. Oct 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For the command couldn't you…
Fri, 09/01/2023 - 22:09

For the command couldn't you just use the block from the geckolib plugin "if entity element (entity) is the (event/target entity, source entity, entity iterator, etc.) entity then play the animation (animation name)"