Citadel
Fabric port of Alexthe666's animation and rendering library with critical 1.21.11 compatibility fixes for entity models and mixins.
A Fabric port of Citadel, a shared code library providing animation, custom rendering, advanced entity pathfinding, and GUI utilities for Minecraft mods. Major 1.21.11 compatibility work migrated entity renderer mixins to Minecraft's render-state pipeline and fixed model codec registration.
- Java 21
- Fabric
- Fabric Loader 0.19.2
- Fabric API
- Gradle
- Mixin
- Minecraft 1.21.11
- jcodec (optional video codec)
- jaad (optional audio codec)
Citadel is a foundational library for Alexthe666's ecosystem of mods—a dependency that provides reusable components for custom entity models, procedural animations via Tabula files, dynamic lighting effects, and jukebox-driven entity dances. The library originated as Alexthe666's work and has been adapted and maintained across multiple Minecraft versions. This Fabric port backports the mod to the Fabric loader ecosystem and maintains compatibility with 1.21.11.
The 1.21.11 port required substantial rework of the rendering system. Minecraft 1.21.2+ replaced the legacy entity-render API (direct LivingEntity parameters, PoseStack manipulation, MultiBufferSource access) with a new render-state pipeline where renderers operate on immutable render states and submit geometry through a SubmitNodeCollector. Core mixins targeting EntityModel.setupAnim() and LivingEntityRenderer render logic had to be rewritten to inject into the new submit() method signature, with inject points shifted to BEFORE/AFTER the setupAnim call on the render state. Additionally, model ID codec registration was corrected for 1.21.11's BiMap-based ID_MAPPER structure.
The library exposes hooking points through event classes (EventLivingRenderer with pre/post setup animation phases, EventPosePlayerHand for hand rendering) and interfaces for mods to implement custom animation behavior. A custom Lectern block allows in-game interactive guides. The codebase spans 22k lines of Java, implements pathfinding logic (raycoms advanced navigation with stuck detection, tall-walker support, and custom collision checks), fluid rendering type overrides, sky brightness modulation, and component-based data syncronization via Fabric networking.
- Ported legacy entity-renderer mixins to 1.21.11 render-state pipeline — rewritten inject targets for setupAnim() calls within new submit(LivingEntityRenderState, ...) method signature, with require=0 tolerances for API resilience
- Fixed model codec ID registration for 1.21.11 by wrapping each Unbaked model with distinct codec instances, resolving ExceptionInInitializerError on dedicated server boot during Citadel clinit
- Advanced pathfinding module (raycoms) with stuck-escape behavior, tall-walker support, custom passability checks, and voxel-shape collision optimizations via spliterator
- Tabula model system supporting skeletal animation, bone transformation, and procedural leg solving (IK) for quadruped creatures; custom item render properties and display components
- Access widener + mixin configuration defending against Fabric loader version skew and render-state API changes; bulletproof injector setup with require=0 on conditional render paths