Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Chest inventory has too few player inventory slots #3031

Open
Monniasza opened this issue May 6, 2023 · 10 comments
Open

[BUG] Chest inventory has too few player inventory slots #3031

Monniasza opened this issue May 6, 2023 · 10 comments

Comments

@Monniasza
Copy link

When opening a chest, the chest doesn't show the last 4 slots of the player's inventory. It is annoying to not see items that are there.

Chest inventory (it omits 4 last player inventory slots):
screenshot_20230506_104204
Player inventory (it has items invisible in the chest formspec):
screenshot_20230506_104208

@Monniasza Monniasza changed the title Chest inventory has too few player inventory slots [BUG] Chest inventory has too few player inventory slots May 6, 2023
@Monniasza
Copy link
Author

Monniasza commented May 6, 2023

Additionally, the last hotbar slot is shown as if it were a regular slot.

@sfan5
Copy link
Member

sfan5 commented May 6, 2023

Wouldn't it be the responsibility of the mod that increased hotbar size to also make the necessary changes so that chests display correctly?

@Monniasza
Copy link
Author

I've not changed the hotbar size, it is default size.

@sfan5
Copy link
Member

sfan5 commented May 6, 2023

No, the default hotbar size is 8 and it shows identical in the inventory as in a chest. I've just confirmed this myself.

@appgurueu
Copy link
Contributor

appgurueu commented May 6, 2023

It isn't just the hotbar size; it looks like a mod is extending your inventory to be 9*4 rather than 8*4. It would be the responsibility of this mod to deal with chest formspecs, although we should maybe provide an API to make this easier.

@rollerozxa
Copy link
Member

rollerozxa commented May 6, 2023

i3 extends the inventory width from the default 8 to 9. (It also has a setting to disable this and make the inventory width 8)

@Monniasza
Copy link
Author

The game should expose an API to adjust and get player inventory capacity and hotbar size, which should be used by formspecs and could be changed by mods.

@appgurueu
Copy link
Contributor

The engine already exposes such APIs. The hotbar (which also is engine configurable) is IMO unrelated; hotbar size could be used as inventory display width, but it shouldn't be.

I think it should be sufficient to just make all formspecs showing the player inventory variable (and parameterize them in terms of the player inventory size). This won't be particularly pretty (esp. for 9*4 slots, since the last row will have just 4 slots then), but it will be better than just hiding slots.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Jun 30, 2023

This is clearly a problem with the mods destroying the game too much. Please complain to the respective mod authors to fix these bugs.

I recommend to close this issue as invalid.

@appgurueu
Copy link
Contributor

This is clearly a problem with the mods destroying the game too much. Please complain to the respective mod authors to fix these bugs.

Indeed it is; however the issue on our end is that we don't really provide APIs to allow mod authors to change the inventory size without having to significantly duplicate MTG code. Strictly speaking such "dehardcoding" could be considered a feature though.

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

No branches or pull requests

5 participants