Import and Apply Blockbench Animations to Custom Entities
Export Your Animation from Blockbench
In Blockbench, create or open your model and animations. Export the model in Bedrock Entity format (.json), ensuring all animations are included in the export. GeckoLib reads Blockbench's native animation data, so verify your keyframes and easing curves are set correctly before export.
Register the Model in Your Mod
Place the exported JSON file in your mod's assets folder. Create a class that extends AnimatedGeoModel and override the necessary methods to point to your model file location. Register this model class with your entity or block using GeckoLib's registration system.
Apply Animations to the Entity
In your entity class, extend AnimatedGeoEntity and reference your model. Override the registerControllers() method to add animation controllers. Use addAnimation() to link specific animations (by name, matching your Blockbench animation labels) to triggers like movement, attacks, or idle states.
Test In-Game
Spawn your entity and observe the animations playing. Adjust keyframe timing or easing in Blockbench if animations feel too fast, slow, or unnatural. Re-export and reload to see changes immediately.