Fixes 1481: Not using the right itemcount in a few cases
This commit is contained in:
parent
6a18102ea0
commit
7dd283cf9f
1 changed files with 2 additions and 2 deletions
|
@ -395,6 +395,7 @@ public class CellInventory implements ICellInventory
|
||||||
* if ( tagType instanceof NBTTagShort ) ((NBTTagShort) tagType).data = storedItems = (short) cellItems.size();
|
* if ( tagType instanceof NBTTagShort ) ((NBTTagShort) tagType).data = storedItems = (short) cellItems.size();
|
||||||
* else
|
* else
|
||||||
*/
|
*/
|
||||||
|
this.storedItems = (short) this.cellItems.size();
|
||||||
if( this.cellItems.isEmpty() )
|
if( this.cellItems.isEmpty() )
|
||||||
{
|
{
|
||||||
this.tagCompound.removeTag( ITEM_TYPE_TAG );
|
this.tagCompound.removeTag( ITEM_TYPE_TAG );
|
||||||
|
@ -403,11 +404,11 @@ public class CellInventory implements ICellInventory
|
||||||
{
|
{
|
||||||
this.tagCompound.setShort( ITEM_TYPE_TAG, this.storedItems );
|
this.tagCompound.setShort( ITEM_TYPE_TAG, this.storedItems );
|
||||||
}
|
}
|
||||||
this.storedItems = (short) this.cellItems.size();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if ( tagCount instanceof NBTTagInt ) ((NBTTagInt) tagCount).data = storedItemCount = itemCount; else
|
* if ( tagCount instanceof NBTTagInt ) ((NBTTagInt) tagCount).data = storedItemCount = itemCount; else
|
||||||
*/
|
*/
|
||||||
|
this.storedItemCount = itemCount;
|
||||||
if( itemCount == 0 )
|
if( itemCount == 0 )
|
||||||
{
|
{
|
||||||
this.tagCompound.removeTag( ITEM_COUNT_TAG );
|
this.tagCompound.removeTag( ITEM_COUNT_TAG );
|
||||||
|
@ -416,7 +417,6 @@ public class CellInventory implements ICellInventory
|
||||||
{
|
{
|
||||||
this.tagCompound.setInteger( ITEM_COUNT_TAG, itemCount );
|
this.tagCompound.setInteger( ITEM_COUNT_TAG, itemCount );
|
||||||
}
|
}
|
||||||
this.storedItemCount = itemCount;
|
|
||||||
|
|
||||||
// clean any old crusty stuff...
|
// clean any old crusty stuff...
|
||||||
for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )
|
for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )
|
||||||
|
|
Loading…
Reference in a new issue