Fix data loss in BasicCellInventory (#327)

This commit is contained in:
Neeve
2023-12-16 03:26:43 +11:00
committed by GitHub
parent adac94555b
commit 80a473a93b
@@ -140,7 +140,7 @@ public class BasicCellInventory<T extends IAEStack<T>> extends AbstractCellInven
if (this.canHoldNewItem()) // room for new type, and for at least one item!
{
final int remainingItemCount = (int) this.getRemainingItemCount() - this.getBytesPerType() * this.itemsPerByte;
final long remainingItemCount = this.getRemainingItemCount() - (long) this.getBytesPerType() * this.itemsPerByte;
if (remainingItemCount > 0) {
if (input.getStackSize() > remainingItemCount) {
final T toReturn = input.copy();