Potential fix for underflow errorFixed

On my server with stack sizes set to 10'000'000 using the Stack Size Controller plugin I get an underflow on line 424 of this plugin when trying to use a large furnace.

I fixed it by changing the line from:

int totalAmount = Math.Min(item.amount + container.itemList.Where(slotItem => slotItem.info == item.info).Take(numOreSlots).Sum(slotItem => slotItem.amount), item.info.stackable * numOreSlots);​
to
int totalAmount = Math.Min(item.amount + container.itemList.Where(slotItem => slotItem.info == item.info).Take(numOreSlots).Sum(slotItem => slotItem.amount), Math.Abs(item.info.stackable * numOreSlots));​

This might not be the "correct" fix as I didn't quite grasp the calculations you're doing there, but at least it keeps large furnaces working.

thx u )

Tested, works

Thank you!
This solved it for me.

Locked automatically