-
-
Notifications
You must be signed in to change notification settings - Fork 128
Keyframe Triggers (Geckolib3)
GeckoLib supports custom callbacks from animations via keyframe handlers. This allows for your animation to define certain additional effects such as particles, sounds, or just about anything else.
To use this feature in BlockBench, click Animation
-> Animate Effects
. You'll see a new animation panel pop up in the animator. From here, you can add global keyframes to your model.
This is split into three types in GeckoLib:
- Sounds
- Particles
- Custom Instructions
To handle sound keyframe callbacks, you add an instance of ISoundListener to your AnimationController
via registerSoundListener
.
This listener will then be called at the appropriate time as marked by the keyframe in the animation json.
For an example of this, see the Jack in the Box example item
To handle particle keyframe callbacks, you add an instance of IParticleListener to your AnimationController
via registerParticleListener
.
This listener will then be called at the appropriate time as marked by the keyframe in the animation json.
Custom instructions are helpful for non-sound and non-particle things you want to do to your entity at a specific time in your keyframe.
To handle custom keyframe callbacks, you add an instance of ICustomInstructionListener to your AnimationController
via registerCustomInstructionListener
.
This listener will then be called at the appropriate time as marked by the keyframe in the animation json.
Geckolib 3
Geckolib 4
- Installation
- Getting Started
- Upgrading from GeckoLib 3.1.x to 4.0
- Updating to GeckoLib 4.5
- Basic
- Advanced
- Miscellaneous
Package repository hosting is graciously provided by Cloudsmith.
Cloudsmith is the only fully hosted, cloud-native, universal package management solution that enables your organization to create, store and share packages in any format, to any place, with total confidence.