[TUTORIAL] How to sync damage to a GeckoLib animation

Started by wa1rox on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to sync damage to a GeckoLib animation
Thu, 05/08/2025 - 06:42 (edited)

Hello! This is a tutorial on how to sync damage to a geckolib animation. With this method you can use 1 or multiple, randomly selected animations(like for a custom boss).

Here is a link to the procedure: https://i.imgur.com/AHGYy6C.png

In this procedure, i used a variable that decreases on each hit. When it hits zero, the animation plays and damage is dealt after a delay.

Set the trigger to "On entity attacked", source entity to your custom mob, and event/target entity to the player, or any other entity if you want to trigger the animation when your mob attacks something else. 

Hope this tutorial helps,

Have a great rest of your day and happy modding!

Edited by wa1rox on Thu, 05/08/2025 - 06:42