Description

✨ About
Write it once, run it everywhere. CoolCatLib: Core is the purr-fect foundation for multi-loader mods: write your mod once in common code, and Core runs it on Fabric, NeoForge and Forge.
- 🐾 One setup for every loader: mod constructors that Core wires in for you
- 📣 Events and networking from common code, with payloads that need no codec
- 📦 Registries, menus and attachments that work the same everywhere
- ⚙️ Configs as code: declared once, with files, syncing, validation and commands
📦 Players: this is a library mod. It does nothing on its own; install it when another mod needs it.
🐾 Mod constructors
Write your mod's setup once: ModConstructor, ClientModConstructor, ServerModConstructor and DataGenerationConstructor, each with a construct stage and a setup stage. Core wires them into each loader. On Fabric that's an entrypoint in fabric.mod.json; on NeoForge and Forge, a single call in your @Mod class.
📣 Events
Listen to server, player, entity, block and client events from common code. Listeners are ordered by phase and can pass, allow, deny or interrupt. You can also make your own events with EventInvoker.create.
- Server lifecycle and ticks, data pack syncs
- Player join, leave and tick, entity loading
- Block break and place, commands
- Client ticks, HUD rendering, item tooltips, client commands
📡 Networking
Register serverbound and clientbound payloads and send them in one line. A record is the whole payload: Core derives the codec from its components (primitives, strings, common Minecraft types, enums, nested records, lists, maps, optionals and more), so there's no StreamCodec to write.
📦 Registries & menus
DeferredRegisterandRegistryEntrythat work the same on every loader- Creative tabs, reload listeners, block entity types
ExtendedMenus: menu types that open with extra data- Key mappings, menu screens and tooltip components from common code
🧶 Attachments
Typed data on players, entities, block entities and item stacks: saved with a codec, synced to the players you pick (NONE, SELF, TRACKING, ALL, or your own rule), kept on death or when dropped, and backed by change listeners.
⚙️ Configs
Declare settings in code, with defaults, ranges and comments:
- Scopes: client, common, server (synced to every player), world (stored per world) and startup (read before content is registered)
- Booleans, ranged numbers, strings, enums, colors, ids, lists and any
Codec - TOML or JSON5 files with generated comments
- Validation, presets, versioned migrations and renamed keys
- Hot reloading, change listeners and config events
/coolcatcore configcommands to get, set, reset and reload values
🧰 Also included
Item containers and layouts, sided inventories, brewing recipes, data components, platform helpers (loader, environment, mod checks, fake players) and a box of small utilities.
🎨 Looking for visuals?
GUI widgets, skyboxes and screen effects live in CoolCatLib: Canvas.


