Links
Tags
Creators
Details
1.4.0+neoforge-1.21.7
Compatibility
Changes
CodxLib 1.4.0
This file is for NeoForge 1.21.7. 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 mirrorsForgeConfigSpec.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 — passBuilder#onChangeif you copy handles into static fields.ModInfonames CurseForge too — two new components,curseforgeSlug(for the link) andcurseforgeProjectId(for the version check; the two routes need different keys). The old 4-argument constructor andModInfo.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, andPagedMenuBuilder#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,).
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:6oyMM4yX:yBDp9Ail"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:6oyMM4yX:yBDp9Ail"
}

