Overview#
Code Chicken Lib (also written CodeChickenLib or CCL) is a library / API mod. It adds no blocks, items, or creatures of its own. Instead it provides a large, well-tested toolbox of shared code that other mods build on top of, so every dependent mod does not have to re-implement the same low-level systems.
What Code Chicken Lib provides:
- a 3D math and transformation library (vectors, matrices, cuboids, rotations),
- a flexible model and block rendering framework,
- a packet / networking abstraction for sending custom data between client and server,
- a structured configuration system,
- colour and lighting helpers,
- ASM / bytecode helpers,
- and many common inventory, registration, and utility building blocks.
Because it is a dependency, it is present in your game only because another mod relies on it.
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.
Config, Colours & Utilities#
A structured configuration framework, colour and lighting helpers, ASM/bytecode utilities, inventory helpers, and assorted common utility classes. These remove a lot of repetitive boilerplate from the mods that depend on the library.
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.
Troubleshooting & FAQ#
My game crashes and the log mentions CodeChickenLib or a missing dependency. Make sure the correct Code Chicken Lib build is present, or update it to match the version the dependent mod requires.
I installed Code Chicken Lib but nothing changed. That is expected - it adds no content on its own. You need the mod that uses it (for example Ender Storage).
Can I remove it? Only if you also remove every mod that depends on it; otherwise those mods break.
Is it a performance / cheat mod? No. It is a code library with negligible direct gameplay impact, existing purely to support other mods.
There are several files with similar names - which do I pick? Pick the build whose version matches your game version and the requirement listed by the mod you are installing it for.