maruohon / itemscroller

A client-side Minecraft mod that adds various convenient ways of moving items within inventory GUIs, such as scrolling over stacks to move single items to or from it
GNU Lesser General Public License v3.0
147 stars 68 forks source link

Send too many packet in specific situations #70

Open 821938089 opened 2 years ago

821938089 commented 2 years ago

When the number of items stack is larger than the inventory empty slot. Use Alt+Left Click to move item will cause a large number of packets sent to the server. Worst case scenario for moving a stack items requires sending about 1000 slot click packets.

Mod version: itemscroller-fabric-1.17.1-0.15.0-dev.20210707.005506.jar

2021-11-08_13 24 25 2021-11-08_13 24 29

maruohon commented 2 years ago

Okay so the excessive number of slot clicks is caused by the scrolling fallback option. There are also other improvements and optimizations that can be made, but I'll try to take care of those later during the planned total rewrite of the mod.

So for now you can avoid this excessive amount of slot clicks by disabling the Toggles -> enableScrollingStacksFallback option.

I also fixed a related smaller bug for the upcoming 1.18 release, which caused a few dozen extra clicks if that above option was disabled (basically the last stack was being moved without checking for that option, so if it could not fit then it was attempted to be inserted to every slot in the target inventory).