From 851878cf184476e6585c037877a55009f2474d8a 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 ac43c90c..7955f9f7 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -394,6 +394,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 ); @@ -402,11 +403,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 ); @@ -415,7 +416,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++ )