Skip to content

InvSee: Fix row and column order of modded inventories - #336

Open
Eldrinn-Elantey wants to merge 2 commits into
masterfrom
fix/invsee-row-order
Open

InvSee: Fix row and column order of modded inventories#336
Eldrinn-Elantey wants to merge 2 commits into
masterfrom
fix/invsee-row-order

Conversation

@Eldrinn-Elantey

Copy link
Copy Markdown
Contributor

Summary

The slot grid was built with the player inventory in mind: rows were laid out bottom to top so the hotbar ends up at the bottom, and MainInventory shuffles its indices to compensate. Every other IModdedInventory inherited that layout without compensating, so their rows were rendered in reverse order.

The row width was hardcoded to 9 as well. Adventure Backpack uses 6 rows of 8 plus 6 special slots, and Backpack Mod widens the grid up to 19 columns once a backpack no longer fits in 7 rows of 9, so both were laid out with the columns shifted.

BackPack AdventureBackpack2
java_z2PTGUR97O java_IMi0oy1OVs
Before After
java_UBE4GYgPMs java_g57vhEmlWO
java_AHJy2wNwD0 java_pDgd1ROXIj

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Eldrinn-Elantey
Eldrinn-Elantey requested a review from a team August 9, 2026 12:08
The slot grid was built for the player inventory: rows go bottom to top and the row width is hardcoded to 9. Every other inventory inherited that, so modded inventories came out mirrored, and those that aren't 9 wide (Adventure Backpack, large Backpack Mod backpacks) came out with the columns shifted.
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.

1 participant