CC2 Phase 0: scaffolding, colossalchests2 rename, CC1 teardown - #214
Conversation
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
|
|
||
|
|
||
| // Unit tests in common run against vanilla Minecraft classes. | ||
| neoForge { |
There was a problem hiding this comment.
Sure the changes in this file will work, since this is common to all loaders?...
There was a problem hiding this comment.
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
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
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
Phase 0 of the Colossal Chests 2 implementation plan.
Summary
feature/1.21-lts-v2did not exist, so I created it as an exact copy ofmaster-1.21-lts(no extra commits). All phase PRs target it.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.propertiesand README).git grep -P 'colossalchests(?!2)'has zero hits outside the changelogs.loader-commonagainst vanilla classes (neoForge.addModdingDependenciesTo(sourceSets.test)inmultiloader-loader-common.gradle, which onlyloader-commonapplies).GeneralConfig(categorychest):baseSlots(27),maxSlots(81) anddepthSize2...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).data/<ns>/colossalchests2/material/<name>.json(upgrade slots, max size, blast resistance).data/<ns>/colossalchests2/upgrade/<name>.json(Phase 5). A new upgrade, from us or another mod, therefore needs no changes to material files.ChestTablesLoader.fromJsonbuilds the tables from loaded files; nothing loads them from datapacks yet (Phase 3).GameTestsCommon, run on NeoForge, Forge and Fabric.Validation
./gradlew buildpassesTestChestTables(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./gradlew runGameTestServer: "All 2 required tests passed" on Fabric, Forge and NeoForge (ours plus Cyclops Core's)colossalchests2Per 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.mdandIMPLEMENTATION_PLAN.mdare not added to the repo, as requested.dev/clientdevbridge/is not in the repo, per review.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.ConfigHandlerNeoForgecreates the per-location builder but passes the common one toonConfigPropertyInit. As a result:config/colossalchests2-common.toml, not per world, and aren't synced to clients.minimalValue/maximalValuearen't enforced, because properties usedefinerather thandefineInRange.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 onmaster-26(CyclopsMC/CyclopsCore#252). On 1.21-lts, CC2 lives with it:The options keep
configLocation = SERVER, so they become per-world options without code changes once CC2 is on 26.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