From 465f9efbd5bb170e534c3eb88847da30a83a3b84 Mon Sep 17 00:00:00 2001 From: yueh Date: Thu, 6 Aug 2015 23:04:57 +0200 Subject: [PATCH] Fixes #1481: Updated cell itemcount when empty --- 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 407c8751..ac43c90c 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -400,9 +400,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 @@ -413,9 +413,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++ )