Sophisticated Backpacks

Sophisticated Backpacks

89M Downloads

Item deletion issue with laggy/low TPS multiplayer servers

SamHammie opened this issue ยท 2 comments

commented

Describe the bug
When using backpacks on servers with low TPS and/or high amounts of lag, sometimes you can remove a stack upgrade when you still have over-filled stacks, and if you sort your backpack while it's in that state, all the over-filled stacks will attempt to migrate into the free slots, however if there's not enough room for all of them, the extras that were closest to the back of the backpack get deleted.
No crash log included as this is not a crash.
I'm running ATM7 version 0.4.32

To Reproduce
Steps to reproduce the behavior:

  1. Open an iron backpack or higher on a multiplayer server.
  2. Put in two or more high value stack upgrades, such as diamond or netherite.
  3. Fill one slot with over the total amount of items the backpack can hold without any upgrades.
  4. Try removing one of the upgrades that would make you unable to retain over-filled stacks while the server is laggy and/or has low TPS.
  5. Once in a while, the stack upgrade will be removed. When I produced the bug, I had sorted the backpack just before removing the upgrade, though that may have no correlation.
  6. While keeping the upgrade outside of the slot, sort the backpack. The over-filled stack(s) will fill all remaining slots of the backpack from front to back, and anything that the mod tries to sort into slots further than the total number of slots gets deleted rather than dropped onto the ground.

Expected behavior
I'd expect the backpack to either refuse to allow me to remove the upgrade on step 5 of reproduction or toss the items on the ground on step 6.

Screenshots
I don't have any screenshots.

Versions
Backpacks version 3.18.24.704, Core version 0.5.9.115, Forge version 40.1.80 for 1.18.2

commented

The lag isn't going to do anything with this as the check is done server side before the upgrade is put in your hand, so the most lag can cause there is for this logic to take longer before it shows you the error that the upgrade can't be removed. I will need to understand the actual steps that can be used to remove it without the error being shown and what mod needs to be in pack in addition to sophisticated ones for this to happen.

commented

I got steps today from another report on how to recreate stack upgrade removal and already fixed that in the latest sophisticated core release. So just download that one to fix.