use internal stack for the oredict list
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user