From 6bb465be0b1ecfbcfc978fd67c567c67f69c3da1 Mon Sep 17 00:00:00 2001 From: fscan Date: Tue, 26 Jun 2018 10:32:58 +0200 Subject: [PATCH] Fixes #3449: Prevent CellInventory#getCell() from mutating the cell itemstack definition (#3552) CellInventory#getCell() initalizes the ItemStack with an empty NBT and therefore was messing with the item definition. --- src/main/java/appeng/me/storage/CellInventory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/appeng/me/storage/CellInventory.java b/src/main/java/appeng/me/storage/CellInventory.java index ba651af12..ca44e6202 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -223,7 +223,7 @@ public class CellInventory implements ICellInventory // any NBT data for empty cells instead of relying on an empty IItemContainer if( CellInventory.isStorageCell( input.getDefinition() ) ) { - final IMEInventory meInventory = getCell( input.getDefinition(), null ); + final IMEInventory meInventory = getCell( input.createItemStack(), null ); if( meInventory != null && !this.isEmpty( meInventory ) ) { return input;