Inventory Sorting

Inventory Sorting

13M Downloads

Always disable sorting on a screen

Fulmineo64 opened this issue ยท 6 comments

commented

Hi kyrptonaught,

I'm Fulmineo, creator of The Guild mod.

I recently got this issue that explains that the sort button is present in the Quests Screen, where it really doesn't make sense to be.

image

Is there a better way to always hide it out of the box that to add "guild:quest_screen" in defaultDoNotSortList present in IgnoreList.java?

If not I'd really appreciate if you could add it for the next release.

Thank you, have a great new year!

commented

Same goes for the mod Bountiful. It even enables an exploit where you can generate unlimited decrees by repeatedly sorting because it removes the decree from the decree section (which is otherwise not possible).
I have no affiliation with Bountiful so I can't really help more but I just thought I'd mention it here because the issue is so similar.

commented

This has been fixed in 1.8.4

commented

I wish I would've saw this a bit sooner, I just released an update :P

1.8.2 and 1.8.3 makes it really easy to hide buttons in certain GUIs. Just hold left control and click on the sort button. You will then be prompted in chat to continue. This will hide it for all players on the server(This is the same thing as editing the config file method you mentioned). Although instead you should add it to the hideSortBtnsList. This will hide both buttons.

I can add it to the default blacklist for next release though too.

commented

At least now with the blacklist being server sided, server owners can blacklist the inv on their end to prevent the dupes.

I really need to come up with a better way of blacklisting inventories. Any suggestions? Maybe auto load the blacklist from a curated github list on launch? Maybe I can implement a smarter system of detecting if the opened inventory is a sortable one. And If there is an instance of the player inventory too. I'm just not sure how to do this well. It's really hard to generically determine what should and shouldn't be sorted. Bountiful's bounty board is a perfect example of this. It shows the player inventory, and it displays an inventory of its own with 20+ slots arranged accordingly.

commented

Hi kyrptonaught,
thank you for your quick response.

The absolute best way to handle the situation would be to detect if the screen has an inventory displayed on it and place the buttons accordingly.
Unfortunately, from what i know, there isn't an easy and reliable way to do this.

The "curated list" approach sounds like it would be the most reliable one.

One method that I'd personally really like would be to have a file, specified by mod, that disables all or some of the screens of said mod.

So in my case with The Guild mod I could have my file in the resources folder, or maybe even better as a datapack, to decide which screens to disable, not to mention that if you manage to handle it with datapacks the users would be able to customize the configurations.

Anyway, thank you for your willingness.
I hope that this new configuration system turns out great!
Bye!

commented

Thank you for solving this issue, and so quick too. Really appreciate the effort and this mod in general.