Strut
A mesh and animation engine for Minecraft Java mods, for Fabric on 1.21.1. Server-authoritative animation, typed animation events, and asset delivery, with as little code in your mod as possible.
What Strut gives you
- Free-form meshes and armatures, not just cubes: skinned, deformable models in a compact binary format (
.strutmodel,.strutanim) written by the Blockbench plugin. - The server owns animation. Your code says "play walk on base"; every client derives the exact pose from a shared clock. Late joiners, lag and reconnects just work. See Playing animations.
- Typed events with an exactly-once guarantee. Keyframes in a clip can run gameplay code on the server and cosmetic code (sounds, particles) on clients, without duplicates or skips. See Events.
- Asset sync. Put models, textures and sounds in a data pack on the server; every player receives them on join, with no resource pack to install. See Asset sync.
- Shader-pack friendly, fast rendering. A GPU instanced path that works under Iris shaders, including shadows. See Rendering and performance.
- Almost no boilerplate. An entity is a class with no body and a one-line registration. See Entities.
Where to start
Getting startedYour first Strut entity in five minutes.
EntitiesThe class, the registration, and how files are found.
Items, armor and blocksThe same one-line registration for everything else.
Players with a bodyDraw a player as a Strut model, with no second entity.
ArmourA model for each slot, bound to the wearer by bone name.
ScenesSeveral entities animated together: the base for cutscenes and paired animations.
Playing animationsplay, seek, setRate and stop from the server.
EventsMarkers, sounds and your own typed events.
Coming from GeckoLib?The rename table and what changed.
PhysicsJiggle, hair, cloth, flesh and ragdolls.
RenderingThe GPU path, shader packs, shading styles and the F9 overlay.
Render pipeline hooksYour own shader code, coloured lights and render events.
Commands and debuggingCommands, the overlay and the log.
Requirements
| Minecraft | 1.21.1 (Java Edition) |
|---|---|
| Loader | Fabric Loader 0.17 or newer, with Fabric API 0.100.0+1.21 or newer |
| Java | 21 |
| Optional | Iris (shader packs) is supported and detected automatically |
About the names. Strut began as a fork of GeckoLib and inherits its keyframe animation engine. The API has been renamed to Strut names; if you are moving a mod over, read Migrating from GeckoLib.