CookieLib
by Alexa3004
CookieLib is a Fabric library for client-side mods, with shared tools for API calls, websocket messages, stored data, custom screens and runtime textures.
What it does
Other mods can build on CookieLib instead of writing these pieces themselves. It provides a construction layer for handling API calls, a handler for websocket messages, a way to store custom data, and a set of custom UI elements for screens. Textures can also be registered at runtime, so a mod does not need to ship every image in its resources.
CookieLib is client-side only, so only the client needs it and servers run without it. It is published for Fabric alone, with a single game version, 1.21.5, and its latest file is 2.5.0, dated 2025-08-09. The library is not open source and is released under All rights reserved. Two catalog mods require it: CookieCapes and CookiEmojis.
Key features
API call construction
A construction layer builds the requests a mod sends to external APIs, so each mod does not assemble them by hand.
Websocket message handling
Incoming websocket messages are routed through a handler that dependent mods can subscribe to.
Custom data storage
Mods can keep their own data in a storage component the library provides, separate from the game's saved world data.
Custom UI elements
A set of UI elements can be placed on custom screens, for mods that need menus beyond the vanilla ones.
Runtime texture registration
Textures are registered while the game runs, which lets a mod add images without bundling them in advance.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Required by 2 mods
Use cases
Mods that call web services
A client mod that reads data from an online service can use the API and websocket layers rather than its own networking code.
Mods with custom menus
A mod that adds a settings or information screen can reuse the UI elements instead of drawing every widget itself.
Who it’s for: Mod developers who build client-side Fabric mods for Minecraft 1.21.5, and players who use CookieCapes or CookiEmojis, which need CookieLib installed.
How it compares
Built! is a Fabric and NeoForge mod for 1.21.1, under All rights reserved and not open source, so it targets a different loader and version from CookieLib. NovaHook is a client-side only Fabric library for 1.17.1, released under the GNU Lesser General Public License v3.0 only and open source. ws2tcp is client-side only and open source under the Apache License 2.0, but covers 1.21.4 instead of 1.21.5.
Questions
Does CookieCapes need CookieLib?
Does CookieLib have to be installed on servers?
Which loader and version does CookieLib support?
In the catalog
CookieLib is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 15,307 mods support Minecraft 1.21.5.
More from Alexa3004
Similar mods
What the author says
A client-side library mod, which extracts common tasks for all of my mods This library includes feature like - constructing and handling api calls - handling websocket messages - storing custom data - custom ui elements and screen - registrating textures at runtime
Official listing
- Modrinth page
- modrinth.com/mod/cookielib
- Owner
- Alexa3004
- Published
- 2025-07-22
- Updated on Modrinth
- 2025-08-09
- Facts verified
- 2026-10-15
