more fixes to autocrafting and ore dict magic
This commit is contained in:
@@ -80,6 +80,9 @@ public class CraftingPattern implements ICraftingPattern {
|
|||||||
if (mekanism && ((ItemStack) input).hasTagCompound()) {
|
if (mekanism && ((ItemStack) input).hasTagCompound()) {
|
||||||
stripped.getTagCompound().removeTag("mekData");
|
stripped.getTagCompound().removeTag("mekData");
|
||||||
}
|
}
|
||||||
|
if (stripped.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
|
stripped.setItemDamage(0);
|
||||||
|
}
|
||||||
oreInputs.add(Collections.singletonList(stripped));
|
oreInputs.add(Collections.singletonList(stripped));
|
||||||
} else {
|
} else {
|
||||||
List<ItemStack> cleaned = new LinkedList<>();
|
List<ItemStack> cleaned = new LinkedList<>();
|
||||||
@@ -88,6 +91,9 @@ public class CraftingPattern implements ICraftingPattern {
|
|||||||
if (mekanism && stripped.hasTagCompound()){
|
if (mekanism && stripped.hasTagCompound()){
|
||||||
stripped.getTagCompound().removeTag("mekData");
|
stripped.getTagCompound().removeTag("mekData");
|
||||||
}
|
}
|
||||||
|
if (stripped.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
|
stripped.setItemDamage(0);
|
||||||
|
}
|
||||||
cleaned.add(stripped);
|
cleaned.add(stripped);
|
||||||
}
|
}
|
||||||
oreInputs.add(cleaned);
|
oreInputs.add(cleaned);
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
steps.add(new CraftingStepCraft(network, pattern, usedStacks));
|
steps.add(new CraftingStepCraft(network, pattern, usedStacks));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (missing.isEmpty()) {
|
|
||||||
ItemStack[] took = new ItemStack[9];
|
ItemStack[] took = new ItemStack[9];
|
||||||
|
if (missing.isEmpty()) {
|
||||||
if (!pattern.isProcessing()) {
|
if (!pattern.isProcessing()) {
|
||||||
for (int i = 0; i < usedStacks.size(); i++) {
|
for (int i = 0; i < usedStacks.size(); i++) {
|
||||||
ItemStack input = usedStacks.get(i);
|
ItemStack input = usedStacks.get(i);
|
||||||
@@ -202,6 +202,7 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ItemStack byproduct : (!pattern.isProcessing() && pattern.isOredict() && missing.isEmpty() ? pattern.getByproducts(took) : pattern.getByproducts())) {
|
for (ItemStack byproduct : (!pattern.isProcessing() && pattern.isOredict() && missing.isEmpty() ? pattern.getByproducts(took) : pattern.getByproducts())) {
|
||||||
toInsert.add(byproduct.copy());
|
toInsert.add(byproduct.copy());
|
||||||
@@ -210,7 +211,6 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
for (ItemStack output : (!pattern.isProcessing() && pattern.isOredict() && missing.isEmpty() ? pattern.getOutputs(took) : pattern.getOutputs())) {
|
for (ItemStack output : (!pattern.isProcessing() && pattern.isOredict() && missing.isEmpty() ? pattern.getOutputs(took) : pattern.getOutputs())) {
|
||||||
toInsert.add(output.copy());
|
toInsert.add(output.copy());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
usedPatterns.remove(pattern);
|
usedPatterns.remove(pattern);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user