use internal stack for the oredict list

This commit is contained in:
way2muchnoise
2016-10-28 19:17:32 +02:00
parent e2d3047ddb
commit 38131305ce

View File

@@ -35,9 +35,10 @@ public class OreDictedItemStackList implements IItemStackList {
@Override @Override
public void add(ItemStack stack) { public void add(ItemStack stack) {
underlyingList.add(stack); underlyingList.add(stack);
if (underlyingList.get(stack).stackSize == stack.stackSize) { ItemStack internalStack = underlyingList.get(stack);
for (int id : OreDictionary.getOreIDs(stack)) { if (internalStack != null && internalStack.stackSize == stack.stackSize) {
stacks.put(id, stack); for (int id : OreDictionary.getOreIDs(internalStack)) {
stacks.put(id, internalStack);
} }
} }
} }