Tweakeroo

Tweakeroo

2M Downloads

[Bug] HandRestock sometimes causes items to be clicked when entering inventory

iSneaky opened this issue ยท 3 comments

commented

First, sorry for the title, could not think of a way to explain this issue.

Basically whenever I enable handrestock, along with handRestockPre, sometimes when I am placing blocks, then quickly enter my inventory, I am holding some of the blocks that I am placing, when I say holding I mean that I have the stack of items clicked, and I am able to move them around.

Please see video below to show what is going on.
In the video you can see that I am fortuning my ores, I am holding down both leftclick and rightclick, when I enter my inventory, I am somehow holding some blocks with my mouse, the 2nd bit of the clip is what is happening, just slowed down.

MC version: 1.15.2
Tweakeroo version: tweakeroo-fabric-1.15.2-0.10.0-dev.20200424.222527

commented

This used to happen a lot (for example when using fast block placement) before the hand restock pre mode was added, because of server to client inventory sync delays. The pre-mode of restocking pretty much fixed them in that case. If it also happens with it, then it might be because of server-side anti-cheat which rejects some inventory click actions if they happen too fast. Or maybe it's related to holding down both use and attack, I've never tested that case myself...

Basically it's really tricky to try to fix this reliably because it's related to what happens or doesn't happen on the server side. So the client does a bunch of slot click actions in quick succession at first, after which the restock is done as far as the client is concerned, but then later on when the server syncs the inventory state it's not actually in the same state that the client assumed it would end up in while doing the slot clicks, because the server either rejected some of the clicks or the inventory got de-synced somehow and that's why the server rejects some of the slot clicks.

commented

Gotcha, that does make a lot of sense, it doesn't always happen when holding left and right-click down, it can also happen when just placing blocks fast in a line. Thank you for the explanation though

commented

There was actually a missing check in the "slot sync workaround" feature that was fixed recently in 1.12.2, which caused one of the inventory sync glitch workarounds to not work with the Fast Block Placement tweak. I don't think I've cherry-picked that fix to 1.15.2.