Skip to content

Add player equipment, optional Curios/backpack drawers, and session drawer memory - #93

Merged
dshadowwolf merged 3 commits into
master-2.0-1.21.1-neofrom
codex/inventory-magic
Nov 6, 2026
Merged

dshadowwolf merged 3 commits into
master-2.0-1.21.1-neofrom
codex/inventory-magic

Conversation

@faceofcat

Copy link
Copy Markdown
Collaborator

Machine screens now expose player equipment and optional equipped storage directly, with consistent drawers that remember their state across machines during the current world/server session.

Changes

  • Add armor and offhand slots beside player inventory; place color selectors and pause/redstone controls above it and remove the inventory label.
  • Add optional Curios equipment/cosmetic slots and a six-column backpack drawer whose tab uses the equipped item's icon.
  • Use only generic item-handler insertion/extraction for backpack transfers, including drag distribution, hotbar swaps, and double-click collection. Containers retain their own placement/merging behavior; gestures starting in normal inventory use vanilla handling.
  • Share drawer framing and top/bottom insets, allow side configuration to grow into available screen space, and collapse unused settings space.
  • Remember drawer choices, backpack page/selection, and automation group across machine screens for the current connection.
  • Keep Curios optional and Sophisticated Backpacks/Core as companion development fixtures only. Default manual development clients to 2560 × 1440.

Validation

  • check build: 130 JUnit tests, 69 library GameTests, 36 companion GameTests, and release-jar checks passed.
  • runCompanionClientSmoke: all five menus, real Curios/backpack interactions, and cross-machine drawer memory passed.
  • Added client regressions for normal-inventory left/right drags held across frames, double-click collection with the backpack open, and backpack drags released over player slots.
  • runCompanionClientSmoke -PwithoutBackpacks passed with optional mods absent.
  • Final build --offline and git diff --check passed.

GUI protocol is now version 6, so clients and servers need matching MMDLib builds. Backpack upgrades/crafting/settings UI is outside this storage integration.

@dshadowwolf

Copy link
Copy Markdown
Collaborator

You dodged a lot of bits I was concerned about, so good job!

Must Fix:

  1. A dropped drawer request freezes the whole screen for up to 5 seconds, Escrow included
  2. Inactive Curios slots accept items -- the code ignores the active flag, so even deactivated slots can be interacted with

Should Fix:

  1. The full drawer state is rebuilt every tick even when nothing changed
  2. A static field keeps the old world in memory after you disconnect

Cleanups:

  1. At least 3 instances of duplicated code spotted
  2. You appear to have encoded a size preference -- 2560x1440 -- into the tests. While I have no objection (thats my default monitors fullscreen) and its an offscreen render, its not very nice.

@dshadowwolf
dshadowwolf merged commit a9867db into master-2.0-1.21.1-neo Nov 6, 2026
5 checks passed
@faceofcat
faceofcat deleted the codex/inventory-magic branch November 6, 2026 14:13
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