flokol120 / Spigot-Item-Chest-Sorter

A Spigot/Paper minecraft plugin to sort your messy items into separate chests | 💯% written in Kotlin
GNU General Public License v3.0
5 stars 6 forks source link

Set item filter through a GUI instead of item frames #49

Open ReySniperio opened 1 year ago

ReySniperio commented 1 year ago

Item frames can become laggy on a server, it would be better if you can set a filter through a GUI.

flokol120 commented 1 year ago

@ReySniperio Please elaborate, what you mean exactly by filter through a GUI. In which situations are item frames "laggy" for you? Spigot/Paper already has a few optimizations in place to limit performance impact of item frames such as a lower tick rate. I've never experienced any problems with items frames myself. That's why I am curios how you managed to have a performance issue with them :D

You can however also lower the tick rate of hanging entities (such as item frames) by increasing the hanging-tick-frequency if you experience lag directly connected to item frames.

ReySniperio commented 1 year ago

Lots of double chest and item frames always have been laggy. Maybe not if you only use them for the sorter but we use them also for decorating etc. Never the less a option for setting filters on a chest through a GUI would be more convenient. For example clicking a chest with a "filter hoe" will open a gui where you can set your filter by dragging in the specific items you want.

flokol120 commented 1 year ago

Alright, but chests cannot be eliminated out of the equation obviously :D But lets not focus on performance too much, I understand you feature request UI-wise. Unfortunately, I am not really able to fathom how you imagine this GUI would look like. Could you please be more specific. Maybe you could use a Screenshot of a similar use case or even mocking it up.

ReySniperio commented 1 year ago

2023-07-25_16 21 08

If you click on a chest with a "filter hoe" a GUI appear where you can set your flters for a specific chest. This would be better in my eyes. Now you have to configure sets or you have to put loads of itemframes on a chest. In case of sets, not every player wants their chest sorted like the sets are configured.

PS: dont mind the icons in my inventory thats a mod.

flokol120 commented 1 year ago

Ahh, thanks for the clarification. Now I get it :). I hate to brek it, though this would won't be that easy to implent, as this would mean I had to change some core elements of the plugin. But in general I really like this idea and I'll come back to it as soon as I have more free time.

TL; DR: I cannot give an ETA but I'll tend to it sooner or later.

In the end I would however combine the simplicity of the item frame approach and the GUI approach by displaying the first item of the GUI within the item frame. This will ensure backwards compatibility.

AE720 commented 11 months ago

Lots of double chest and item frames always have been laggy. Maybe not if you only use them for the sorter but we use them also for decorating etc. Never the less a option for setting filters on a chest through a GUI would be more convenient. For example clicking a chest with a "filter hoe" will open a gui where you can set your filter by dragging in the specific items you want.

A lot of that is the nature in how Minecraft handles timings.

If you set hanging-tick-frequency to 2147483647 in spigot.yml, that will help and for chests, they produce added ticks for things like animations. Mods (not plugins) can disable that but you can also just use barrels and that'll fix that issue.

You can view more information on it here: https://github.com/PaperMC/Paper/issues/2383

You're better off going down that route for simplicity but I wouldn't object to a config to disable the item frame feature either.