Skip to content

Let copper golems use colossal chests - #11

Merged
rubensworks merged 2 commits into
master-26-ltsfrom
feature/copper-golems
Oct 11, 2026
Merged

rubensworks merged 2 commits into
master-26-ltsfrom
feature/copper-golems

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Copper golems can now work with colossal chests:

  • Golem Chest Wall (new): golems take items out of the chest through it, like from a copper chest (up to 16 of the first item). Recipe: any plain chest wall + any copper chest.
  • Every colossal chest is a destination: golems put items into the core of any formed colossal chest without a Golem wall. Vanilla's sorting rule applies: only into an empty chest, or one that already holds that item. Hoppers' insert rules (filters, void upgrades) apply too.
  • No putting items back: a chest with a Golem wall never receives items from golems, so they don't return items to the chest they took them from. I also checked this rule by removing it: the tests then fail because the golem puts the stone straight back.
  • The chest lid opens while a golem uses it, as for vanilla chests.

Implementation
No loader has a hook for golem targets: vanilla only scans ChestBlockEntitys, and the destination is hard-coded to chests and trapped chests. So a mixin extends TransportItemsBetweenContainers:

  • It scans and accepts colossal chest targets.
  • It gives them a container whose pickup and deposit go through the chest storage.
  • It skips the "blocked from above" check.
  • Golems walk to the side of the target, and their reach and line of sight count from the ground in front of it. Vanilla paths to the first free block above a target (the top of the chest) and only reaches targets at the golem's own height, so without this, cores above the bottom row were unreachable.

The mixin config moved from loader-forge to loader-common and is now also registered for NeoForge and Fabric, with remap = false since 26.x is unobfuscated. The golem logic lives in GolemTransport. Non-golem mobs are not affected.

Testing

  • 4 new game tests:
    • golem takes from a Golem wall into a vanilla chest;
    • golem sorts from a copper chest into a size 4 colossal chest, whose core is above the golem;
    • golem doesn't put items back into its source;
    • target, sorting, pickup and lid rules.
  • testRecipes also covers the Golem wall recipe.
  • ./gradlew build passes. Game tests pass twice in a row on NeoForge (108/108), Forge (108/108) and Fabric (110/110).
  • clientdevbridge (NeoForge): two golems moving items from an iron chest with a Golem wall into a gold chest. Lids open, sorting is respected, and the log has no CC2 warnings.

Limitations

  • Golems only use chests whose core (destination) or Golem wall (source) is on a side face with walkable ground in front of it.
  • Vanilla's "first item" rule means a golem always takes the first item type in the chest.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6


Generated by Claude Code

Golems take items out through the new Golem wall, like from a copper
chest, and sort items into the core of any colossal chest without one,
so they never put items back where they took them. Loaders have no hook
for golem targets, so a mixin extends vanilla's golem behavior, now with
a common mixin config for all loaders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
@coveralls

coveralls commented Oct 10, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38110247126

Coverage decreased (-0.8%) to 76.495%

Details

  • Coverage decreased (-0.8%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 29 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

29 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
org/cyclops/colossalchests2/blockentity/BlockEntityChestCore.java 18 87.59%
org/cyclops/colossalchests2/gametest/GameTestsCommon.java 6 97.1%
org/cyclops/colossalchests2/client/render/RenderChestCore.java 5 27.27%

Coverage Stats

Coverage Status
Relevant Lines: 7171
Covered Lines: 5826
Line Coverage: 81.24%
Relevant Branches: 2997
Covered Branches: 1952
Branch Coverage: 65.13%
Branches in Coverage %: Yes
Coverage Strength: 9.86 hits per line

💛 - Coveralls

Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
@rubensworks
rubensworks merged commit 7cdea8d into master-26-lts Oct 11, 2026
3 checks passed
@rubensworks
rubensworks deleted the feature/copper-golems branch October 11, 2026 04:07
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.

3 participants