Fixed autocrafting not giving back byproducts, fixes #390
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- Every machine now compares on damage and NBT by default (raoulvdberge)
|
||||
- Updated JEI, fixes crashes (way2muchnoise)
|
||||
- Fixed crash with Disk Manipulator (way2muchnoise)
|
||||
- Fixed autocrafting not giving back byproducts (raoulvdberge)
|
||||
- New art by CyanideX (CyanideX)
|
||||
|
||||
### 1.0.5
|
||||
|
||||
@@ -33,6 +33,11 @@ public interface ICraftingPattern {
|
||||
*/
|
||||
List<ItemStack> getOutputs();
|
||||
|
||||
/**
|
||||
* @return the byproducts
|
||||
*/
|
||||
List<ItemStack> getByproducts();
|
||||
|
||||
/**
|
||||
* @return the id of the factory that creates a crafting task for this pattern, as defined in the registry
|
||||
*/
|
||||
|
||||
@@ -91,6 +91,11 @@ public class CraftingPattern implements ICraftingPattern {
|
||||
return outputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getByproducts() {
|
||||
return byproducts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return ItemPattern.isProcessing(stack) ? CraftingTaskFactoryProcessing.ID : CraftingTaskFactoryNormal.ID;
|
||||
|
||||
@@ -45,6 +45,11 @@ public class CraftingTaskNormal extends CraftingTask {
|
||||
network.insertItem(output, output.stackSize, false);
|
||||
}
|
||||
|
||||
for (ItemStack byproduct : pattern.getByproducts()) {
|
||||
// @TODO: Handle remainder
|
||||
network.insertItem(byproduct, byproduct.stackSize, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user