Roundaround / mc-fabric-inventory-management

MIT License
7 stars 6 forks source link

Ability to move buttons for mod compatibility #5

Open UncleArya opened 2 years ago

UncleArya commented 2 years ago

Hey there! I really love the simplicity and light-weightedness of this mod. It takes the best features of mods like Inventory Profiles and Inventory Sorter, but without all the bloat. My only question would be if you have any future plans to add a feature that would allow for moving of the buttons in some way? I've noticed the positioning of the buttons in the inventory screens of mods like Travelers Backpack and Tom's Simple Storage and others with custom GUIs create conflict and overlap. I am not sure how challenging something like that may be, so it might not be possible for a lightweight mod like this but it would certainly be a feature I would love! Thank you 😊

Roundaround commented 2 years ago

Hi! Thanks for reporting. Any chance you have some screenshots of where the buttons show up? It's possible I could just add some config options to change their offsets.

Though the bigger concern would be whether the "expanded inventory" style mods stick to vanilla closely enough for the buttons to still function correctly. For instance, if they've expanded the size of the "main" inventory (the three rows of 9 in your inventory, not including the hotbar) then only the first 27 slots of the inventory will currently get sorted. Similarly if they increase the hotbar size, anything beyond the 9th slot will get included in the sort.

Most likely in the end I'll need to go through each mod's source code 1 by 1 and figure out a way to make it compatible. If the mod gets enough traction/popularity I'll reach out to the other mods' authors and figure out a better integration. Adding options to change the positioning of the buttons would be pretty doable, I just want to make sure that it's the best possible solution. Right now the position is determined by the "top-right-most" slot in the inventory, then offsetting by a hardcoded number of pixels. If we make that offset configurable in the easiest sense, it'll move the buttons for all inventories and screens, which would screw up some of the smaller ones unaffected by the mods, like hoppers and saddlebags

UncleArya commented 2 years ago

Hey! Thank you for that explanation. I can definitely understand why you set it up to stick to the "top-right-most" inventory slot, that sounds like the smartest way to ensure as much compatibility as possible. I can't even pretend to understand how mods get created and what is needed to make things compatible. Especially when having to potentially account for countless other mods. I think you have made an awesome mod, and I can try to attach some screenshots as examples of things I have seen if it helps!

Scout is a new mod that I was trying out and noticed this had happened. 2022-07-02_20 04 59

The Create mod adds some custom GUIs, which I imagine makes things harder for other mods to be compatible with. 2022-07-02_20 08 55

I happened to have the Brewing Guide by Vanilla Tweaks in a resource pack on this file. 2022-07-02_20 11 22

Some mods, like Tom's Simple Storage, just cause the buttons to be offset a bit, which is not an issue at all. Just something I noticed. 2022-07-02_20 04 13

Lastly, mods that add new storage options, like Expanded Storage, don't seem to register the same as vanilla storage options so they don't have any of the buttons showing up. 2022-07-02_20 06 56

I am not sure if any of that is helpful at all. I can try to do some other testing if it would help you in some way. But again, I am not trying to find issues or imply your mod is at any fault at all. I think you have mad an awesome mod that is a wonderful addition and will be great for many people. I just wondered if a config or feature to move the button locations might allow users to fix any compatibility issues so you wouldn't have to account for all that yourself. That sounds like a lot of work. I am not sure if you are familiar with Inventory Profiles Next, but that mod has an edit mode where you can set custom button location for each different inventory screen.

mamokin commented 9 months ago

last image where the sort buttons straight up do not render is the issue I am facing as well. Other mods have similar issues with sorting. I found a single semi-working solution with the "Sort" mod but it only works if the user is in creative mode (for modded storages)