Skip to content

Colossal Chests 2, Phase 7: Display wall - #224

Merged
rubensworks merged 9 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase7b-display
Oct 5, 2026
Merged

rubensworks merged 9 commits into
feature/1.21-lts-v2from
feature/1.21-lts-v2-phase7b-display

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

The Display wall, as its own PR (one feature per PR). The Redstone and Magnet walls follow separately.

Summary

What it shows (agreed at review: an item type, not a slot):

  • One item type per side of the wall that is on the outside of the chest. A corner wall has three sides, each with its own item.
  • For each item, its count across the whole chest, counting every compression form as that type. For example, 300 iron blocks and 10 ingots show as 2.71K iron ingots.
  • A fill bar for the slots holding the type; it turns red when full.
  • Small indicators for the upgrades affecting the type: Lock, Void and Compression.
  • Each side has its own options, all on by default: shown, count, fill level and upgrade indicators (agreed at review).
  • A hidden side looks and acts like a plain chest wall: clicks open the chest, and it mines like a wall. While the player sneaks, it shows the Display wall icon, like Interface and Void walls, and sneak-right-clicking it with an empty hand opens the settings. Every side can be hidden.

Look (agreed at review):

  • A recessed dark panel in a frame of the chest's material, so it looks built into the giant chest, with the item, the count (with a text shadow), the fill bar and small flat upgrade icons inside it.
  • The plate has sides down to the chest surface, so it reads as a mounted plate instead of floating in front of the chest.
  • Items show like an inventory icon, as in Storage Drawers, so blocks such as cobblestone look 3D.
  • A client config option, displayItemFrameStyle, shows blocks and other 3D items front-on like an item frame instead; flat items are unaffected.
  • Items are lit by the world, so they darken at night with the chest instead of glowing.
  • It always shows on the giant chest, unlike other functional walls, and an empty shown side shows the empty panel.

Clicks (drawer style, agreed at review), each on the clicked side:

Action Effect
Left-click Take a stack: into the held slot when it is empty or holds the same item, the rest into the inventory, dropping what does not fit
Sneak-left-click Take one item, the same way
Right-click with an item, empty side Show that item on the side and insert it
Right-click with the side's item Insert it
Right-click with an empty hand right after an insert on the same side (double right-click) Insert all of the side's item from the inventory
Right-click with an empty hand otherwise Open the Display settings
Sneak-right-click with an empty hand Nothing on a shown side; on a hidden side, open the Display settings

Settings GUI:

  • A column per outer side, named relative to the chest's front (Front, Back, Left, Right, Top, Bottom, as seen when facing the front).
  • Each column has a ghost slot for its item, a Shown/Hidden button, and three small icon toggles for count, fill level and upgrade indicators. An off toggle is dimmed and struck through; tooltips give the name, state and what it does.
  • Clicking a slot with an item shows that item and leaves the cursor untouched; clicking with an empty cursor clears it; shift-clicking an inventory item puts it in the first empty side.
  • It shares its ghost slot logic with the Interface settings (ContainerGhostSettings).

Chest settings removed: the chest's visual settings (fill levels, counts, upgrade indicators) only ever affected Display walls, so they moved to each side of each wall (agreed at review). ChestSettings, its packet, item component, client sync and loot table entry are removed, and the chest's settings tab keeps only the lock and void buttons. Nothing is released yet, so there is no migration.

Mining safeguard (agreed at review, Display wall only):

  • On a shown side, only a tool that can harvest the wall mines it. Any other left-click takes items and never mines, in survival and creative, so taking items can't break the chest.
  • Each loader cancels the left-click before mining starts (NeoForge and Forge LeftClickBlock, Fabric AttackBlockCallback).
  • The client then sends a small packet with the clicked side to take items, once per click: a take needs the attack button to have been released since the previous one. A client tick hook per loader tracks this, so held clicks (and creative's repeat) take once while quick separate clicks each take.

Other:

  • A Display wall gives no item access to automation.
  • The items and options are saved on the block entity.
  • The counts and flags are recomputed on the server every 10 ticks and after clicks, and synced only when they change.
  • Textures are placeholders for Phase 9.

Design deviations

  • Item type instead of a chosen slot: agreed at review. The display keeps working when the item spreads over slots or moves.
  • An item per side: asked at review; the design has one item per Display wall.
  • Visual toggles per side instead of per chest: agreed at review; the design puts them in the chest's settings tab.
  • Left-click takes instead of right-click: agreed at review, for drawer-style controls.
  • Choosing what to show: sneak-right-click with an item can't reach a block in vanilla (the item is used instead). So the first item right-clicked into an empty side is shown, like drawers, and the settings GUI chooses or clears items.
  • "Upgrade indicators" is read as the upgrades affecting the shown item (Lock, Void, Compression), not all installed upgrades (confirmed at review).

Validation

Acceptance criterion Covered by
Count, fill and indicators Unit tests TestDisplayStats (6): counts across slots and compression forms, capacity, fill, lock and void flags, tag round trip
Insert, double right-click insert all, take, take one, held slot first, sneak-right-click does nothing Game test testDisplayWallInsertsAndTakes, through the same item-then-empty-hand click path the server uses, and the take packet's encode, decode and server action
Settings GUI ghost slot Game test testDisplayWallSettings
An item per side, options per side, hiding sides (all of them too), a hidden side acts like a plain wall, synced to clients Game test testDisplayWallFaces
Synced to clients, saved, no item access Game test testDisplayWallSyncsAndHasNoItemAccess
Only a harvesting tool mines it Game test testDisplayWallOnlyMinedWithAPickaxe: empty hand, a block and a sword are cancelled, a pickaxe is not, an Interface is never protected
Each option state on a side, hidden sides while sneaking, sneak-right-click on a hidden side clientdevbridge, below (game tests can't open a menu for a mock player)

testSettingsTravelWithCore and the settings checks in other tests are removed with the chest settings.

Totals: 290 unit tests; game tests Fabric 73, Forge 71, NeoForge 71, all passing.

In-game (clientdevbridge): scripts and screenshots are in clientdevbridge-screenshots/phase7b-display. On NeoForge, an iron 3x3:

  • the front side with each of its options toggled (display-all-toggles.png and the three "no" variants), now set per side; they match the earlier chest-wide screenshots pixel for pixel apart from the plate's new sides;
  • the look on a wood and an iron chest with blocks and flat items, with the item frame setting, at night, and the plate from the side;
  • real input read back from the inventory: 64 ingots per left-click, 1 while sneaking, 5 ingots from 5 quick sneak-clicks 2 ticks apart, 6 from 6 clicks 1 tick apart in survival, 1 from a 60 tick hold, and the wall never broke;
  • a left-click with an empty hotbar slot 5 selected filled slot 5, although slot 0 was free; with 62 ingots held, the held stack was topped up to 64 and the rest went elsewhere;
  • right-click with 64 ingots then right away with the empty hand inserted both inventory stacks; a later empty right-click opened the settings; sneak-right-click did nothing;
  • the settings slot: shift-click, click with an item, click to clear;
  • a corner wall with a different item on its top, front and right side, set by real right-clicks; the settings with three columns; hiding sides through the buttons; the hidden front showing the plain chest and opening the chest on right-click;
  • the same corner wall with all three sides hidden: plain chest normally, the Display wall icon on each hidden side while sneaking; sneak-right-click on a hidden side opened the settings, a plain right-click opened the chest;
  • the same corner wall with the front count, right fill level and top upgrades toggled off through the icon buttons, and the result in the world;
  • the chest's settings tab with only the lock and void buttons;
  • an iron pickaxe broke it.
  • Fast clicks and the single-side settings GUI were also checked on Fabric. Forge was not checked in-game.

Known issues

  • Corner notch: where two plates meet on a corner block, a half pixel notch remains along the edge.
  • Unformed walls: a Display wall that is not part of a formed chest has no outer sides, so it shows nothing and its settings have no columns.
  • Rebuilt chests: sides keep their items and options by world direction, so a rebuilt chest can expose sides of the wall that were set up differently.
  • No chest-wide switch: turning counts off on every Display wall of a chest means doing it per wall and side.
  • The latch: a Display wall at the top centre of the front sits under the chest's latch, which hides part of it (kept as is at review).
  • Coveralls: may drop for the new rendering and GUI code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6

claude added 2 commits October 4, 2026 17:44
A functional wall that shows one item type, its count across the chest, a fill
bar and the upgrades affecting it, honouring the chest's visual settings.
Drawer style clicks: left-click takes a stack or one while sneaking, right-click
inserts, a double right-click inserts all. Only a tool that can harvest it mines
it, so taking items never breaks the chest. Chest settings are now synced to
clients for rendering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
The item sits in a dark panel with the count, fill bar and flat upgrade icons
inside it. The frame style is still switchable while the look is chosen.

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

Copy link
Copy Markdown
Member Author

coverage/coveralls fails on 921c31b: coverage went from 77.5% to 77.1%.

The uncovered lines are the client rendering of the Display wall (DisplayWallOverlay and the new overlay helpers). The game tests don't render. The Display wall's logic is covered: the stats by unit tests, and the clicks, sync and mining safeguard by game tests. The rendering is checked in-game with the clientdevbridge screenshots instead. I'm not adding tests just to raise the number.


Generated by Claude Code

claude added 6 commits October 4, 2026 18:09
Frames use the chest's material, and items show like an inventory icon by
default. A client config option shows blocks and other 3D items like an item
frame instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
- Right-click with an empty hand opens a GUI with a ghost slot to choose
  the displayed item. Sneak-right-click with an empty hand does nothing.
- Fix double right-click: empty-hand clicks were consumed by useItemOn,
  so they never reached the insert-all logic.
- Fix fast sneak-left-clicks being merged: a take now needs the attack
  button to be released since the last one, tracked with a client tick
  hook per loader, instead of a 6 tick debounce.
- Render the sides of the display plate, so it no longer floats in front
  of the chest.
- Share the ghost slot menu logic between the Interface and Display menus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Left-clicks fill the player's selected slot when it is empty or holds the
same item, and only put the rest elsewhere in the inventory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Each outer face of a Display wall shows its own item and stats. Clicks
act on the clicked face, and the take packet carries it. The Display
settings have a column per face, named relative to the chest's front,
with a ghost slot and a Shown/Hidden toggle. A hidden face renders and
acts like a plain wall; the last shown face can not be hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Each side of a Display wall now has its own count, fill level and upgrade
indicator toggles, next to its Shown/Hidden toggle in the Display
settings, shown as small icon buttons. Display walls were the only thing
the chest's visual settings affected, so those settings are removed: the
ChestSettings record, its packet, item component, sync and loot table
entry, and the three toggles in the chest's settings tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Hidden sides show the Display wall icon while the player sneaks, like
other functional walls, and sneak-right-clicking one with an empty hand
opens the Display settings. As hidden sides stay reachable, every side
of a wall may now be hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
Comment thread loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json Outdated
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 cc81f9f into feature/1.21-lts-v2 Oct 5, 2026
3 checks passed
@rubensworks
rubensworks deleted the feature/1.21-lts-v2-phase7b-display branch October 5, 2026 17:43
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