Encoded Processing Pattern with Duplicate Outputs is Invalid
shartte opened this issue ยท 2 comments
It's actually being merged into one stack when the pattern is decoded, but then it can't find the primary output anymore with exactly the same amount leading to this problem.
This might have been a bug introduced by my refactor. See this block from AEProcessingPattern. The comment doesn't match the actual code, and "smaller stack size" also just seems wrong? Shouldn't it be "larger stack size", in case it got merged with secondary outputs?
// Ensure the primary output is the first in the list, even if it has a smaller stack size.
int primaryOutputIndex = -1;
for (int i = 0; i < condensedOutputs.length; ++i) {
if (primaryOutput.equals(condensedOutputs[i])) {
primaryOutputIndex = i;
}
}