Overview#
Code Chicken Lib (also written CodeChickenLib or CCL) is a library / API mod by covers1624 and the TheCBProject team (originally ChickenBones). 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, you install Code Chicken Lib only because another mod asks for it.
Do I Need This?#
Yes - if another mod tells you to. Code Chicken Lib is a required dependency for several mods by the same team - 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. Installing 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's install page lists Code Chicken Lib (CodeChickenLib / CCL) as a requirement, install it. Otherwise you do not need it.
Getting Started#
- Match the version. Always download the Code Chicken Lib build that matches both your game version and the version required by the mod that depends on it. A mismatched library is the number-one cause of crashes.
- Drop the jar into
.minecraft/modsalongside the mod that needs it (and your mod loader). - Launch. That is all - Code Chicken Lib works silently in the background, powering the dependent mod's rendering, networking, and configuration.
There is normally no config you need to touch; the library just needs to be present and version-correct.
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 (Gradle)
repositories {
maven { url = "https://cursemaven.com" }
}
dependencies {
// Replace with the build that matches your game/loader version
implementation "curse.maven:codechicken-lib-1-8-242818:<FILE_ID>"
}
Also declare Code Chicken Lib as a required dependency in your mod metadata (e.g. neoforge.mods.toml) so the loader enforces correct load order.
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. Install the correct Code Chicken Lib build, 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.