Skip to content

CC2 Phase 0: scaffolding, colossalchests2 rename, CC1 teardown - #214

Merged
rubensworks merged 6 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase0-scaffolding
Oct 3, 2026
Merged

rubensworks merged 6 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase0-scaffolding

Conversation

@rubensworks

@rubensworks rubensworks commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Phase 0 of the Colossal Chests 2 implementation plan.

Summary

  • feature/1.21-lts-v2 did not exist, so I created it as an exact copy of master-1.21-lts (no extra commits). All phase PRs target it.
  • Renamed the mod to colossalchests2: mod id, Java package (org.cyclops.colossalchests2), resource namespaces, access widener, Gradle group and mod name. Per review, the CurseForge/Modrinth project IDs, display URL and update JSON URLs stay the same as CC1. The description is now "Chests that are quite colossal, and can be upgraded." (gradle.properties and README). git grep -P 'colossalchests(?!2)' has zero hits outside the changelogs.
  • Removed all CC1 gameplay content: blocks, items, block entities, GUI, inventories, packets, renderers, advancement, recipes, loot tables, conditions, IronChest and CommonCapabilities compat, the invtweaks API stubs, non-English lang files. What's left is loader entrypoints, proxies, Cyclops Core wiring, build setup and CI. CC1 block textures stay for reuse later (silver dropped, since it's not in the D-5 table).
  • JUnit now runs in loader-common against vanilla classes (neoForge.addModdingDependenciesTo(sourceSets.test) in multiloader-loader-common.gradle, which only loader-common applies).
  • Chest-wide values are config options in GeneralConfig (category chest): baseSlots (27), maxSlots (81) and depthSize2 ... depthSize10 (stacks per slot by structure size, 4 ... 262144). Getters clamp them to the hard caps (81 slots, size 10, depth at least 1), because config ranges aren't enforced on load (see the Cyclops Core note below).
  • Materials are data-driven, one file per material in its owner's namespace, so mods and datapacks can add materials without overwriting each other: data/<ns>/colossalchests2/material/<name>.json (upgrade slots, max size, blast resistance).
    • Upgrades will be items, and each declares its own values and per-material limits in data/<ns>/colossalchests2/upgrade/<name>.json (Phase 5). A new upgrade, from us or another mod, therefore needs no changes to material files.
    • Every field is optional with a default and unknown fields are ignored, so adding fields later never breaks existing datapacks. Nothing from these files is saved in the world.
    • ChestTablesLoader.fromJson builds the tables from loaded files; nothing loads them from datapacks yet (Phase 3).
  • Game test harness: one shared test in GameTestsCommon, run on NeoForge, Forge and Fabric.

Validation

Criterion Coverage
Builds on all three loaders ./gradlew build passes
JUnit in common TestChestTables (5 tests): shipped material files equal the code defaults, missing fields fall back to defaults, unknown fields are ignored, out-of-range values are rejected. TestGeneralConfig (7 tests): depth for every size, clamping of slot and depth values
Game tests on all loaders ./gradlew runGameTestServer: "All 2 required tests passed" on Fabric, Forge and NeoForge (ours plus Cyclops Core's)
Mod loads as colossalchests2 clientdevbridge on NeoForge (script). Screenshot below

mod list

Per review, the clientdevbridge scripts are not in the code branches. They live next to the screenshots on the orphan branch clientdevbridge-screenshots.

Design deviations

  • DESIGN.md and IMPLEMENTATION_PLAN.md are not added to the repo, as requested.
  • dev/clientdevbridge/ is not in the repo, per review.
  • Materials (and later upgrades) are datapack JSON, one file per entry, so other mods can add their own. Chest-wide values (slots, depth by size) and scalar options (maxItemsPerSlot, acceptNonStackables, magnet radius) are regular Cyclops config options instead.

Cyclops Core note

The chest options are marked ModConfigLocation.SERVER, but Cyclops Core (1.25.3, and still in the latest 1.30.0-1139) defines every property on the COMMON spec builder. ConfigHandlerNeoForge creates the per-location builder but passes the common one to onConfigPropertyInit. As a result:

  • These options end up in config/colossalchests2-common.toml, not per world, and aren't synced to clients.
  • The SERVER file is registered but empty.
  • minimalValue/maximalValue aren't enforced, because properties use define rather than defineInRange.

The Fabric run shows the same (empty colossalchests2-server.toml). Fixing this is a breaking change for every Cyclops mod, so it is only fixed on master-26 (CyclopsMC/CyclopsCore#252). On 1.21-lts, CC2 lives with it:

  • These options are global per instance, not per world.
  • CC2 never reads them on the client; the server sends whatever the GUI shows.
  • The getters clamp the values.

The options keep configLocation = SERVER, so they become per-world options without code changes once CC2 is on 26.

  • clientdevbridge only supports NeoForge and Fabric. GUI validation will use NeoForge.

Stacking

Later phase PRs are stacked on this one. Until this merges, their diffs will include these commits.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6


Generated by Claude Code

Rename the mod to colossalchests2 (mod id, package, resources, group,
update URLs) and remove all CC1 gameplay content so the branch builds
with only the loader entrypoints, proxies and Cyclops Core wiring.

- Enable JUnit in the common module against vanilla classes.
- Add the data-driven table schema (materials, depth by size, upgrade
  values) with shipped defaults and a loader stub.
- Keep one game test per loader via the shared GameTestsCommon.
- Add dev/clientdevbridge with launch instructions and a mod list check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Comment thread dev/clientdevbridge/phase0-modlist.txt Outdated


// Unit tests in common run against vanilla Minecraft classes.
neoForge {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure the changes in this file will work, since this is common to all loaders?...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Despite the name, multiloader-loader-common.gradle is only applied by loader-common/build.gradle. The loader modules apply multiloader-loader.gradle and the per-loader scripts instead, and both of those only pull in multiloader-common.gradle. So addModdingDependenciesTo(sourceSets.test) and the JUnit dependency only affect the common module's test source set, which puts vanilla classes on its test classpath.

I checked this with ./gradlew build (common tests ran: 4 in Phase 0, 81 once Phase 1 is added) and ./gradlew runGameTestServer. Both pass on Fabric, Forge and NeoForge, and the loader test tasks are unaffected (NO-SOURCE).


Generated by Claude Code

Comment thread dev/clientdevbridge/README.md Outdated
Comment thread gradle.properties
Comment thread gradle.properties Outdated
Comment thread gradle.properties Outdated
Comment thread gradle.properties Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Drop the dev/clientdevbridge files, keep the CC1 project IDs, display
and update URLs, restore the README and .gitignore, and use the
suggested mod description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
claude added 4 commits October 3, 2026 13:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Each material is now its own file under
data/<namespace>/colossalchests2/material/, so mods and datapacks can
add materials without overwriting each other. Chest-wide values move to
data/colossalchests2/colossalchests2/chest.json. Every field is optional
with a default, so adding fields later never breaks existing datapacks.

The global upgrade table and max_depth_upgrades are dropped: upgrade
values and per-material limits will be declared by each upgrade in
data/<namespace>/colossalchests2/upgrade/ when upgrades are added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Base slots, max slots and stacks per slot by structure size are now
config options instead of a datapack file. They are a fixed set owned by
this mod, so per-entry data files are not needed; materials stay
data-driven because other mods add entries. Getters clamp the values,
since config ranges are not enforced on load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
@rubensworks
rubensworks merged commit 07bc640 into feature/1.21-lts-v2 Oct 3, 2026
5 checks passed
@rubensworks
rubensworks deleted the feature/1.21-lts-v2-phase0-scaffolding branch October 3, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants