From 28fc8b175bfc6e0162ea6d1fea273384ae9b1ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 30 Jul 2014 17:09:28 +0200 Subject: [PATCH] Fixed items that only differ in their NBT tag potentially being merged when picked up by a robot. Closes #449. --- src/main/scala/li/cil/oc/server/component/robot/Inventory.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/li/cil/oc/server/component/robot/Inventory.scala b/src/main/scala/li/cil/oc/server/component/robot/Inventory.scala index 3b03dccdf..f31ce1a77 100644 --- a/src/main/scala/li/cil/oc/server/component/robot/Inventory.scala +++ b/src/main/scala/li/cil/oc/server/component/robot/Inventory.scala @@ -88,7 +88,7 @@ class Inventory(val robot: tileentity.Robot) extends InventoryPlayer(null) { else inventorySlots.find(slot => { val existing = getStackInSlot(slot) existing != null && existing.isItemEqual(stack) && - (!existing.getHasSubtypes || existing.getItemDamage == stack.getItemDamage) && + (!existing.getHasSubtypes || (existing.getItemDamage == stack.getItemDamage && ItemStack.areItemStackTagsEqual(existing, stack))) && (existing.stackSize < math.min(existing.getMaxStackSize, getInventoryStackLimit)) }).getOrElse(getFirstEmptyStackAccepting(stack)) if (slot >= firstInventorySlot) {