Incorrect item result comparison in AbstractRecipe
Closed this issue ยท 6 comments
AbstractRecipe uses direct equality checks (equals) instead of ItemStack.is() for result item comparison. This causes issues with item variant (such as the item replaced by using OEI).

Yes,
src/main/java/igentuman/nc/recipes/AbstractRecipe.java
L200
This is where I believed that caused the issue.
It doesn't have such checks here.
public List<ItemStack> getResultItems() {
if(cachedOutputItems == null) {
cachedOutputItems = new ArrayList<>();
for (ItemStackIngredient outputItem : outputItems) {
if(outputItem == null) continue;
List<ItemStack> items = outputItem.getRepresentations();
if(items.size() == 1) {
cachedOutputItems.add(items.get(0));
continue;
}
resolve:
for(String mod: MATERIAL_PRODUCTS.MODS_PRIORITY.get()) {
for(ItemStack item: items) {
if(getModId(item).equals(mod)) {
cachedOutputItems.add(item);
break resolve;
}
}
}
}
}
return cachedOutputItems;
}NuclearCraft-Neoteric/src/main/java/igentuman/nc/recipes/AbstractRecipe.java
Lines 200 to 222 in f4706bc
and is here:
This is not equality check. This is logic where we select item by mod priority config.
Anyways there's some potential problem, i've commited changes. Should fix the problem.
Please try out latest build. If this fixes the problem, we can close this issue.
