Make the API self-contained again - #10
Merged
Merged
Conversation
CyclopsCore compiles this API in a dedicated source set that only sees Minecraft, NeoForge and CyclopsCore's loader-common. Two references had crept in that break that build: - ItemMatch referenced the CommonCapabilities mod's own DataComparator. It only needs two methods, so those are extracted into a new IDataComparator interface that the mod's class can implement. - RecipeDefinition used IModHelpersNeoForge. IModHelpers resolves to the exact same singleton and already declares getMinecraftClientHelpers(), so the loader-specific subinterface is unnecessary. Adds .github/check-self-contained.sh, run from CI, which resolves every org.cyclops reference in this repo and fails when it points at the CommonCapabilities mod or at a CyclopsCore class outside loader-common. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
rubensworks
added a commit
to CyclopsMC/CyclopsCore
that referenced
this pull request
Sep 20, 2026
The previous master-26 tip referenced the CommonCapabilities mod's DataComparator and CyclopsCore's own IModHelpersNeoForge, neither of which is on the api source set's compile classpath. Both are resolved in CyclopsMC/CommonCapabilitiesAPI#10. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
This was referenced Sep 20, 2026
CI checks CyclopsCore out into a subdirectory, which the recursive grep picked up, reporting all of its loader-specific classes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
rubensworks
added a commit
to CyclopsMC/CyclopsCore
that referenced
this pull request
Sep 20, 2026
CyclopsMC/CommonCapabilitiesAPI#10 was squash-merged, so the branch this pointed at is gone. The tree is identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
rubensworks
added a commit
to CyclopsMC/CommonCapabilities
that referenced
this pull request
Sep 20, 2026
CyclopsMC/CommonCapabilitiesAPI#10 was squash-merged, so the branch this pointed at is gone. The tree is identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CyclopsCore consumes this repo as a submodule in a dedicated
apisource set whose compile classpath is deliberately restricted to Minecraft, NeoForge and CyclopsCore'sloader-common. It explicitly does not see CyclopsCore'sloader-neoforgemain sources, and of course not the CommonCapabilities mod.Two references had drifted in that violate that. They compile fine inside CommonCapabilities (where this repo sits inside
src/main/java), which is why they went unnoticed, but they make:loader-neoforge:compileApiJavafail in CyclopsCore. That is what currently blocks CyclopsCore from tracking the latestmaster-26.Changes
ItemMatch.DATA_COMPARATORwas typed as the mod's ownorg.cyclops.commoncapabilities.ingredient.DataComparator. It only uses two methods, so those are extracted into a neworg.cyclops.commoncapabilities.api.ingredient.IDataComparatorand the field is retyped to that.DataComparatorin the mod implements the new interface (CyclopsMC/CommonCapabilities#50).RecipeDefinition.fromRecipeIdusedIModHelpersNeoForge. BothIModHelpers.get()andIModHelpersNeoForge.get()return the exact sameCyclopsCoreInstance.MOD.getModHelpers()singleton, andgetMinecraftClientHelpers()/getRecipes()are already declared on the common interfaces, so dropping the loader-specific subinterface is behaviour-neutral.Guard against regressions
.github/check-self-contained.shresolves everyorg.cyclopsreference in this repo (imports and inline fully-qualified usages) and fails when one points at the CommonCapabilities mod, or at a CyclopsCore class that does not exist underloader-common/src/main/java. It is wired up in a new CI workflow that checks out CyclopsCore alongside this repo.A package-level allowlist would not have been enough here:
IModHelpersNeoForgelives in the sameorg.cyclops.cyclopscore.helperpackage as the perfectly legalIModHelpers. Resolving against CyclopsCore's actualloader-commontree encodes the real invariant instead.Verified that the check fails on the current
master-26tree with exactly those two findings, and passes on this branch.Validation
:loader-neoforge:compileApiJavain CyclopsCore with the submodule moved here: passesbuild+runGameTestServer: greenbuild+runGameTestServer: green🤖 Generated with Claude Code
https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
Generated by Claude Code