Closed BuckarooBanzay closed 4 years ago
I think the problem lies in the way items with a higher than normal stack size are managed, particularly when they are dropped after changing upgrades.
When digging the drawer, items are dropped correctly, at their maximum stack size, and don't cause any problems with entities.
But when items are dropped after upgrades are changed, they get dropped with a stack size of 99, which when the max stack size of the item is very high (65,535 in the case of minegeld notes) causes way too many entities to be spawned.
The other part of the problem is the inconsistency with how items are counted. When putting items in the drawers, items are counted by stacks, which is what allows putting over 2 million minegeld notes in an un-upgraded drawer.
We could disallow digging the drawer (or removing upgrades), when there are too many items in it.
The other part of the problem is the inconsistency with how items are counted. When putting items in the drawers, items are counted by stacks, which is what allows putting over 2 million minegeld notes in an un-upgraded drawer.
Does that mean you can insert a 65k-stack into the drawer? That's definitely a bug then.
I'm happy about any patches.
closing this, thanks @jessicara :+1:
Looks like the drawers can seriously slow down/halt a server with some basic pipeworks setup and in certain cases even in standalone mode.
@OgelGames did some research and managed to reproduce this reliably: https://github.com/pandorabox-io/pandorabox.io/issues/531#issuecomment-694137479
What would be the best way to fix that: