From 7dd283cf9f2c31a9b1b4289a1f3a18f074a2dd6b Mon Sep 17 00:00:00 2001 From: yueh Date: Sun, 16 Aug 2015 15:32:58 +0200 Subject: [PATCH] Fixes 1481: Not using the right itemcount in a few cases --- src/main/java/appeng/me/storage/CellInventory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/me/storage/CellInventory.java b/src/main/java/appeng/me/storage/CellInventory.java index 5242b1da..565d3113 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -395,6 +395,7 @@ public class CellInventory implements ICellInventory * if ( tagType instanceof NBTTagShort ) ((NBTTagShort) tagType).data = storedItems = (short) cellItems.size(); * else */ + this.storedItems = (short) this.cellItems.size(); if( this.cellItems.isEmpty() ) { this.tagCompound.removeTag( ITEM_TYPE_TAG ); @@ -403,11 +404,11 @@ public class CellInventory implements ICellInventory { this.tagCompound.setShort( ITEM_TYPE_TAG, this.storedItems ); } - this.storedItems = (short) this.cellItems.size(); /* * if ( tagCount instanceof NBTTagInt ) ((NBTTagInt) tagCount).data = storedItemCount = itemCount; else */ + this.storedItemCount = itemCount; if( itemCount == 0 ) { this.tagCompound.removeTag( ITEM_COUNT_TAG ); @@ -416,7 +417,6 @@ public class CellInventory implements ICellInventory { this.tagCompound.setInteger( ITEM_COUNT_TAG, itemCount ); } - this.storedItemCount = itemCount; // clean any old crusty stuff... for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )