Fix data loss in BasicCellInventory (#327)
This commit is contained in:
@@ -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!
|
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 (remainingItemCount > 0) {
|
||||||
if (input.getStackSize() > remainingItemCount) {
|
if (input.getStackSize() > remainingItemCount) {
|
||||||
final T toReturn = input.copy();
|
final T toReturn = input.copy();
|
||||||
|
|||||||
Reference in New Issue
Block a user