Skip to content

Colossal Chests 2, Phase 7: Redstone wall - #225

Open
rubensworks wants to merge 3 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase7c-redstone
Open

rubensworks wants to merge 3 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase7c-redstone

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

The Redstone wall, as its own PR (one feature per PR). The Magnet wall follows separately.

Summary

  • A functional wall with a redstone output, like a trapped chest:
    • weak power to every side (agreed at review), so dust, lamps and repeaters next to it work without a comparator;
    • comparator output with the same value.
  • What the signal follows:
    • whole chest (default): the same signal as a comparator on the core, by how full all slots are;
    • one item type: 0 when the chest holds none of it, otherwise 1 to 15 by how full the slots holding it are, counting compression forms like the Display wall does.
  • Settings: sneak-right-click with an empty hand, like the Interface. One ghost slot: empty means whole chest, an item means only that item. The screen also shows what it follows and the current signal. A plain right-click opens the chest, like any wall.
  • Updates:
    • the emitted value is kept on the wall, so redstone does not recompute it on every query;
    • it is recomputed when the chest's contents change (at most once per tick, batched by the core) and when the target changes, plus every 10 ticks to catch the chest forming or breaking;
    • neighbours and comparators are only updated when the value changes, since both read the same value, so hopper traffic and the periodic check cause no block updates while it stays the same;
    • the wall's own block state never changes, so a new value causes no chunk re-render or client packet for the wall.
  • Gives no item access to automation, mines with a pickaxe, and shows its icon while sneaking like other functional walls.
  • Placeholder textures (the Interface frame with red signal bars) until Phase 9.

Design deviations

  • Item type instead of a chosen slot: the design says "one chosen slot or the whole chest". Players can't see slot numbers anywhere in the chest GUI, so a slot index would be hard to pick, and slots move as items do. This follows the Display wall, where an item type instead of a slot was agreed at review. Happy to switch to a slot index if you prefer.
  • Direct power besides the comparator signal: agreed at review. Weak power only; unlike a trapped chest, no strong power downwards, so the signal does not travel through blocks next to the chest.

Validation

Acceptance criterion Covered by
Item type signal Unit tests in TestStorageSignals (3 new): absent type gives 0, only the type's slots count, a single item gives 1
A real comparator next to the wall follows the whole chest, then a target item, then the whole chest again; a lamp directly against a second wall lights; weak power only; target saved; settings ghost slot and signal; no item access; only Redstone walls give a signal or power Game test testRedstoneWallSignal

Totals: 293 unit tests; game tests Fabric 74, Forge 72, NeoForge 72, all passing.

In-game (clientdevbridge): script and screenshots in clientdevbridge-screenshots/phase7c-redstone. On NeoForge, an iron 3x3 with a Redstone wall, a comparator, redstone dust and a lamp, and a second Redstone wall with a lamp directly against it:

  • empty chest: lamps off; 5000 stone: both lamps lit;
  • sneak-right-click opened the settings: "Whole chest", signal 3;
  • shift-clicking dirt into the slot: "Dirt", signal 0, and the comparator's lamp went off;
  • the wall's icon while sneaking.

Not checked in-game on Fabric or Forge, and not re-run in-game after the last commit, which only skips comparator updates while the value is unchanged.

Known issues

  • Forming delay: after the chest forms again, the emitted power can lag up to 10 ticks (comparators read it right away).
  • Coveralls: may drop for the new screen code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6

A functional wall whose comparator output follows the whole chest, like
the core, or the slots holding one item type. The item is set through a
ghost slot in its settings, opened by sneak-right-click with an empty
hand, which also shows the current signal. The core refreshes Redstone
walls when its contents change.

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

Copy link
Copy Markdown
Member Author

CI note: one of the two Build runs on 98fbd5f failed in :loader-forge:compileJava with Could not find net.minecraftforge:forge:1.21.1-52.0.3_mapped_official_... (ForgeGradle's generated Forge artifact missing from that runner's cache). That's dependency setup, not this PR's code: the other Build run on the same commit passed, including all game tests. I've re-run the failed job once.

Coveralls is red as before: coverage dropped 0.2% to 74.7%, mostly from the new screen code that tests can't reach.


Generated by Claude Code

claude added 2 commits October 5, 2026 18:15
Besides the comparator output, the wall now emits the same signal as
weak power to every side, like a trapped chest, so dust and lamps work
without a comparator. The emitted value is kept on the block entity and
refreshed when the chest's contents or the target change, and every 10
ticks to catch the chest forming or breaking; neighbours are only
updated when it changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Comparators read the same value the wall emits, so like the neighbour
update, the comparator update is skipped while the value stays the same.
This keeps hopper traffic and the periodic check free of updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
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