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

[Bug] ItemScroller may be duplicating items in 1.17 #62

Closed aschoettler closed 2 years ago

aschoettler commented 3 years ago

While using ItemScroller (version 0.15.0-dev.20210603.144636) to craft lots of gold nuggets into ingots and throw the results, it seems like the nuggets were duplicated. I don't know if this is a bug with ItemScroller or Minecraft 1.17, but I recorded this video so you can see what happened: https://imgur.com/cq6In3V

maruohon commented 3 years ago

Is there anything special you have to do to get this to happen? Does it happen every time? Is this using massCraft (looks like it)? And looks like you are in single player. But I couldn't get this to happen either in single player or on a server. (I was using the 1.17 release version though, but there should be no differences.)

maruohon commented 3 years ago

I was just told that a similar thing also happened at least in 1.16, rarely, and that these are just client-side ghost items? In that case opening another inventory GUI such as the chest or the crafting table should get rid of the ghost items. Or if not, then at least re-logging?

soulsoiledit commented 3 years ago

I am also having this issue with the same ItemScroller version on a 1.17 Fabric Carpet server after massCrafting slimeballs into slime blocks. I can interact with crafted slime blocks and move them around in inventories even after re-logging. It seems like the excess slime balls that are dropped on the ground after using the massCraft keybind don't disappear.

zombiez4u commented 3 years ago

I'm playing on a 1.17 vanilla server and this same thing happened to me multiple times when crafting gold nuggets to ingots and when crafting dried kelp into blocks. I'm sure these were not client side ghost items as I was able to fill chests with them and they persisted after relogging. I used item scroller quite often in 1.16.4 and never had this issue so it seems like a new bug.

maruohon commented 3 years ago

They changed some of the inventory interaction confirm packet behavior in 1.17 (I haven't looked at the actual code changes yet). Unfortunately it's now possible to both lose or duplicate items via "regular" slot clicks. I assume it probably needs some specific fast timings for some actions to happen, and that's what Item Scroller is doing - sending lots of normal slot clicks very fast.

I don't think there is anything else I can do to fix this from my side than rewriting the crafting features to use the vanilla recipe book protocol. I don't know if some of the other "normal" item movement features would still have the same issue as well... This should really be fixed in vanilla, and I'm hoping 1.17.1 or some later minor update would fix the inventory packet stuff again. The current situation is obviously very bad, since it's even possible to lose or dupe items via just slot clicks.

AFlyinDeer commented 3 years ago

just wanted to confirm items are being duped. mass crafter 2 double chests of iron and was able to get 5 shulker boxes of iron blocks and with the extra i was able to fill the 2 double chest. so basically got 5 free shulker boxes for free. i did see your comment from 2 days ago so i know youre aware of the issue. hopefully next update will help! also thanks for the mod keep up the good work!

Sanluli36li commented 3 years ago

I used mass craft on the 1.17 vanilla server to convert between diamonds and diamond blocks, but the number of items obtained after conversion was different each time, and a negative item appeared in the end. and this is not a ghost item of the client. This only happened in 1.17, I can be sure this is mojang's problem.

Youmiel commented 3 years ago

Reproduced in Minecraft 1.17.1-pre1,
with fabric-loader, malilib and itemscroller, but itemscroller features were not used.

However, with vanilla Minecraft, the ghost item in crafting table at 00:23 doesn't exist (the one I press 'Q' on the crafting table output).

https://user-images.githubusercontent.com/70473080/123631723-a8bb6e00-d849-11eb-8e3a-7ac40ae4fdb2.mp4

Andrews54757 commented 3 years ago

MC-229413, which describes this bug, has been marked by Mojang as fixed in a future version of 1.17 as of two hours ago.