How to trigger Item Animations
Setting up your Item
In your Item class, add SingletonGeoAnimatable.registerSyncedAnimatable
to your constructor. This is needed to sync the animations from the server to the clients.
Next in your registerControllers
add triggerableAnim
to your controller like so
You can add more triggers for each animation you need on your item.
Calling the trigger
To call the trigger, you will simply need to call triggerAnim
wherever you wish to use the trigger, ensuring you are calling the server side only. Here is an example of calling on the onUseTick method of an item
Last updated