Storage Drawers: Biomes O' Plenty Pack

Storage Drawers: Biomes O' Plenty Pack

6M Downloads

Tweaking config values caused weird mess

nicehax opened this issue ยท 3 comments

commented

I tried tweaking the config value for the base storage of the drawer and it was fine, so I tweaked it again to a higher amount and all of a sudden the game started bugging out. Changing it back to the original value worked out fine, but why does the below happen?

16 baseStackStorage seems fine but above that bugged out.

Screenshot 2024-08-28 at 10 21 13 PM

commented

interesting, that's basically max negative integer.

What upgrades are present in the drawer, and how many items were in it?

In some cases drawers use MAX_INT as a value for either capacity or storage, usually related to the two creative upgrades, but possibly in other cases.

commented

There were two emerald upgrades and since I was messing around with configs I had set the upgrades to increase item storage by some ridiculous number that I don't remember.

Interestingly enough it kept happening to any single drawer that I put two emerald upgrades into regardless of how many items were in it; the drawer shown had actually been broken by me and replaced with a new drawer. It's probably that changing the configs led to the possible item storage overflowing since drawers without the upgrades or with two upgrades but able to store multiple items.

commented

Knowing the exact values you used could be helpful.

I mostly consider this a non-issue because you're using values so large that it's definitely overflowing integer math somewhere. I couldn't quite get it to do what you're showing, but I could see the effect in some other places. In the latest release I added some overflow checking, but I don't know if it will fix the particular problem in your screenshot.