Code Chicken Lib — Guide
Do I Need This?
Yes - if another mod relies on it. Code Chicken Lib is a required dependency for several mods - most notably Ender Storage, as well as Chicken Chunks, Translocators, Wireless Redstone and others. Those mods will crash or fail to load without it.
No - on its own. Code Chicken Lib by itself does nothing visible in-game: it adds no mobs, blocks, items, recipes, or world content. There is nothing to "use" directly as a player.
Rule of thumb: if your modpack or a mod lists Code Chicken Lib (CodeChickenLib / CCL) as a requirement, it needs to be present. Otherwise it serves no purpose alone.
How It Loads
Code Chicken Lib works silently in the background, powering the dependent mod's rendering, networking, and configuration. As a player there is nothing to do with it directly - it simply needs to be present and version-correct for the mod that relies on it.
There is normally no config you need to touch.
What It Provides
Code Chicken Lib is best understood as a collection of reusable systems. The main ones:
3D Math & Transforms
A complete vector/matrix math package - Vector3, Matrix4, Cuboid6, Transformation and friends - used for positioning, rotating, and scaling models and rendered geometry. This is the backbone of much of the rendering code in the dependent mods.
Rendering & Models
Helpers for building and drawing custom block and item models, baked-model utilities, a CCRenderState render pipeline, and tools for dynamic/animated rendering. Mods use these to draw their custom blocks and tile-entities without writing low-level rendering code from scratch.
Packets & Networking
A simple packet system (PacketCustom) for sending arbitrary data between the server and clients. Dependent mods rely on this to keep custom block/entity state synced.
Developer API
Modders depend on Code Chicken Lib to avoid re-implementing math, rendering, networking, and config plumbing. Add it as a dependency, then use its APIs.
Declaring the dependency
Declare Code Chicken Lib as a required dependency in your mod descriptor so the game enforces correct load order, and reference it from your build configuration.
3D math example
import codechicken.lib.vec.Vector3;
import codechicken.lib.vec.Matrix4;
Vector3 dir = new Vector3(1, 0, 0);
Matrix4 m = new Matrix4().rotate(Math.PI / 2, Vector3.Y_POS);
dir.apply(m); // dir is now rotated 90 degrees about the Y axis
Custom packet example
import codechicken.lib.packet.PacketCustom;
// build and send a packet to a player
PacketCustom packet = new PacketCustom(MY_CHANNEL, 1);
packet.writePos(pos);
packet.writeInt(value);
packet.sendToPlayer(player);
Always compile and test against the exact Code Chicken Lib version your release targets - the API surface can change between game versions.