Merge pull request #1774 from yueh/fix-1481

Fixes #1481: Updated cell itemcount when empty
This commit is contained in:
yueh 2015-08-15 18:10:30 +02:00
commit 3115147edf

View file

@ -401,9 +401,9 @@ public class CellInventory implements ICellInventory
}
else
{
this.storedItems = (short) this.cellItems.size();
this.tagCompound.setShort( ITEM_TYPE_TAG, this.storedItems );
}
this.storedItems = (short) this.cellItems.size();
/*
* if ( tagCount instanceof NBTTagInt ) ((NBTTagInt) tagCount).data = storedItemCount = itemCount; else
@ -414,9 +414,9 @@ public class CellInventory implements ICellInventory
}
else
{
this.storedItemCount = itemCount;
this.tagCompound.setInteger( ITEM_COUNT_TAG, itemCount );
}
this.storedItemCount = itemCount;
// clean any old crusty stuff...
for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )