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 69 forks source link

MC 1.11.2 scroll up issue #9

Closed SyiSeiko closed 6 years ago

SyiSeiko commented 7 years ago

When you scroll the mouse wheel up (by default), it puts one item at a time. But there is a desync or something on servers. After putting an item it picks up the stack, but not really. If you close the inventory nothing will drop. So you have to click twice, the first time will actually pick up the stack and the second will put it back down. There are no problems with scroll down (pull items), just the put. There are no other mods that add item scrolling on client or server. And I don't really have problems on single player. I've tried the server with this mod and also without it. Problem still persists.

maruohon commented 7 years ago

Yes this is a known issue. It's caused by the vanilla Container/Slot sync checks and the fact that Item Scroller does several emulated slot click actions on the client side basically instantly, so the sync checks then get confused because there have been more changes already before the first checks are made.

I don't really know if there is anything I can do about this in the current way that things work. I'll have to look closer into how the sync checks work.

One thing I have noticed though, is that this happens a lot with my custom inventories from Ender Utilities (even in single player), but inside a vanilla chest things move instantly and without glitching, no matter how fast I scroll. Could you check if scrolling in vanilla chests works perfectly on your server too? Knowing whether vanilla inventories work "perfectly" in general might help me track down the exact cause and a possible solution.

I am however also planning on making changes and adding Item Scroller as an optional server side mod too. This would allow me to avoid making countless emulated slot clicks on the client side, and instead just send one packet/message to the server (assuming Item Scroller is installed on the server side) telling what action to perform there, and then only the resulting changes in slot contents would be synced back to the client.

SyiSeiko commented 7 years ago

I was getting a crash on the server from other mods. And found that after disabling an alpha version of sponge, that the sync issue seems fine. Vanilla chests, the gold chest from the iron chests mod, and even the bag of holding from extrautils2 are giving no more problems... Will keep an eye on it and let you know if anything happens.