InvSee: Fix row and column order of modded inventories - #336
Open
Eldrinn-Elantey wants to merge 2 commits into
Open
InvSee: Fix row and column order of modded inventories#336Eldrinn-Elantey wants to merge 2 commits into
Eldrinn-Elantey wants to merge 2 commits into
Conversation
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.
Eldrinn-Elantey
force-pushed
the
fix/invsee-row-order
branch
from
August 9, 2026 13:25
3dd4748 to
a6d5441
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Checklist