# CodxLib 1.4.0
*This file is for **Forge 1.21.1**. Every loader ships the same CodxLib version, so the notes below apply here too.*
**Update notices link to both stores again.** A notice now ends in a clickable **Modrinth** and
**CurseForge** link, and you click whichever you installed the mod from. 1.3.6 had removed the link
entirely because pointing at one store sent about half of you to the wrong place — offering both is
the better answer to that. Both stores are also now checked for the newer version, so a release
notifies you even if it has only landed on one of them so far. This applies to every codx mod, and
only CodxLib needs updating for it.
**New: a shared settings system for mods built on CodxLib.** A mod declares its options once and
gets four things from that one declaration: the JSON config file, a `/… config` command, an in-game
chest menu, and the handles its own code reads. Nothing changes for you unless a mod uses it —
CodxLib on its own still adds no commands or menus of its own. When a mod does move onto it, its
settings become changeable **without stopping the server**, and your existing config file is read
once and carried over on any loader, so nothing is lost. Alex's Mobs Continued 2.0.15 is the first
mod to use it.
### For developers
- **`codx.codxlib.api.settings.CodxSettings`** — a loader-neutral config spec whose builder mirrors
`ForgeConfigSpec.Builder` (`push`/`pop`/`comment`/`define`/`defineInRange`/`defineList`/
`configure`), so porting is a change of import. `CodxSettingsCommand.node(...)` generates the whole
command tree from a spec; `CodxSettingsMenu.builder(spec)` generates the chest menu. Gson-backed,
comments written as sibling `"// name"` keys, `Builder#legacyFiles(...)` imports an older file.
⚠️ Writes don't bake themselves — pass `Builder#onChange` if you copy handles into static fields.
- **`ModInfo` names CurseForge too** — two new components, `curseforgeSlug` (for the link) and
`curseforgeProjectId` (for the version check; the two routes need different keys). The old 4-argument
constructor and `ModInfo.of(id, slug, version)` still compile unchanged, and CodxLib already knows
the ids of the published codx mods, so existing ones get correct links with no rebuild.
- **Menu toolkit**: `CodxMenuLayout#adjustDouble`, `CodxMenuLayout#cycle`, and
`PagedMenuBuilder#decorate` (a widget applied to every page).
**Compatibility:** everything from 1.3.x is unchanged. Only a mod that wants the settings system has
to raise its `codxlib` range to `[1.4.0,)`.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }