Skip to content

Keep the config extra hooks as interface defaults - #1740

Merged
rubensworks merged 1 commit into
master-26from
claude/minecraft-26-3-update-xr1cny
Sep 20, 2026
Merged

rubensworks merged 1 commit into
master-26from
claude/minecraft-26-3-update-xr1cny

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Fixes a regression introduced by #1738, which is merged and published as 1.33.4-2154.

That PR resolved the // TODO: make non-default in nextmajor markers on IPartType by making the methods abstract and moving their bodies into PartTypeAdapter. For the four ConfigExtra hooks that turned out to be wrong.

In Java a concrete method inherited from a superclass takes precedence over an interface default. A part type that supplies these hooks through a side interface therefore stopped working the moment PartTypeAdapter gained its own empty implementations, and nothing fails to compile — the behaviour just silently disappears.

IntegratedTunnels does exactly this:

public abstract class PartTypeInterfacePositionedAddon<...>
        extends PartTypeTunnel<P, S>                       // -> ... -> PartTypeAdapter
        implements IPartTypeInterfacePositionedAddon<...>  // default snapshotConfigExtra, applyConfigExtra, getConfigExtraEntries

so its interface channel was no longer copied or pasted by the Wrench. Three of its game tests fail against 1.33.4-2154:

testinterfacechanneliscopiedandpasted          Expected The interface channel was not copied to be 5: was 0
testinterfacechanneliscopiedbetweeninterfacetypes  Expected ... to be 3: was 0
testinterfacechannelislistedasanentry          The interface channel can not be switched off on its own

The change

snapshotConfigExtra, applyConfigExtra, getConfigExtraRequirements and getConfigExtraEntries go back to being interface defaults on IPartType, and their implementations are removed from PartTypeAdapter. These four are optional extension points, so an implementation in the adapter defeats their purpose.

The other three methods from #1738 stay non-default: onAspectVariablesChanged was already implemented in PartTypeAdapter before that PR, and snapshotConfig/applyConfig are core plumbing that nothing supplies through a side interface.

Verified

  • IntegratedDynamics: build passes, all 1001 game tests pass
  • Published this to mavenLocal and re-ran IntegratedTunnels against it: the three interface channel tests pass again

I checked the other nine CyclopsMC mods being ported to 26.3 for the same pattern; IntegratedTunnels is the only one that uses it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf


Generated by Claude Code

Making them non-default and implementing them in PartTypeAdapter broke
every part type that supplies them through a side interface: a concrete
method inherited from a superclass wins over an interface default, so the
adapter's empty bodies silently shadowed those implementations, with
nothing failing to compile.

IntegratedTunnels does exactly that in IPartTypeInterfacePositionedAddon,
and its interface channel stopped being copied and pasted by the Wrench.
Three of its game tests catch it.

These four hooks are optional extension points, so an implementation in
the adapter defeats their purpose. They go back to being interface
defaults. The other three methods stay non-default: they are core
plumbing that nothing supplies that way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf
@rubensworks
rubensworks merged commit f8e2b49 into master-26 Sep 20, 2026
5 checks passed
@rubensworks
rubensworks deleted the claude/minecraft-26-3-update-xr1cny branch September 20, 2026 13:48
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 56.939%. remained the same — claude/minecraft-26-3-update-xr1cny into master-26

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