Bugfixes
This commit is contained in:
@@ -14,7 +14,10 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import refinedstorage.RefinedStorage;
|
||||
import refinedstorage.RefinedStorageBlocks;
|
||||
import refinedstorage.RefinedStorageItems;
|
||||
import refinedstorage.block.*;
|
||||
import refinedstorage.block.BlockBase;
|
||||
import refinedstorage.block.EnumControllerType;
|
||||
import refinedstorage.block.EnumGridType;
|
||||
import refinedstorage.block.EnumStorageType;
|
||||
import refinedstorage.gui.GuiHandler;
|
||||
import refinedstorage.item.*;
|
||||
import refinedstorage.network.*;
|
||||
@@ -235,6 +238,18 @@ public class CommonProxy {
|
||||
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING)
|
||||
);
|
||||
|
||||
// Processing Pattern Encoder
|
||||
GameRegistry.addRecipe(new ItemStack(RefinedStorageBlocks.PROCESSING_PATTERN_ENCODER),
|
||||
"ECE",
|
||||
"PMP",
|
||||
"EFE",
|
||||
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
|
||||
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
|
||||
'P', new ItemStack(RefinedStorageItems.PATTERN),
|
||||
'C', new ItemStack(Blocks.crafting_table),
|
||||
'F', new ItemStack(Blocks.furnace)
|
||||
);
|
||||
|
||||
// External Storage
|
||||
GameRegistry.addRecipe(new ItemStack(RefinedStorageBlocks.EXTERNAL_STORAGE),
|
||||
"CED",
|
||||
|
||||
@@ -63,6 +63,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
|
||||
private List<CraftingPattern> patterns = new ArrayList<CraftingPattern>();
|
||||
private List<ICraftingTask> craftingTasks = new ArrayList<ICraftingTask>();
|
||||
private List<ICraftingTask> craftingTasksToAdd = new ArrayList<ICraftingTask>();
|
||||
|
||||
private Set<String> visited = new HashSet<String>();
|
||||
|
||||
@@ -172,6 +173,9 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
}
|
||||
}
|
||||
|
||||
craftingTasks.addAll(craftingTasksToAdd);
|
||||
craftingTasksToAdd.clear();
|
||||
|
||||
Iterator<ICraftingTask> craftingTaskIterator = craftingTasks.iterator();
|
||||
|
||||
while (craftingTaskIterator.hasNext()) {
|
||||
@@ -253,7 +257,15 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
}
|
||||
|
||||
public void addCraftingTask(ICraftingTask task) {
|
||||
craftingTasks.add(task);
|
||||
craftingTasksToAdd.add(task);
|
||||
}
|
||||
|
||||
public void addCraftingTaskForPattern(CraftingPattern pattern) {
|
||||
if (pattern.isProcessing()) {
|
||||
addCraftingTask(new ProcessingCraftingTask(pattern));
|
||||
} else {
|
||||
addCraftingTask(new BasicCraftingTask(pattern));
|
||||
}
|
||||
}
|
||||
|
||||
public List<CraftingPattern> getPatterns() {
|
||||
@@ -704,11 +716,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
|
||||
while (quantity > 0) {
|
||||
if (pattern != null) {
|
||||
if (pattern.isProcessing()) {
|
||||
addCraftingTask(new ProcessingCraftingTask(pattern));
|
||||
} else {
|
||||
addCraftingTask(new BasicCraftingTask(pattern));
|
||||
}
|
||||
addCraftingTaskForPattern(pattern);
|
||||
|
||||
quantity -= quantityPerRequest;
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
CraftingPattern pattern = controller.getPatternForItem(input);
|
||||
|
||||
if (pattern != null) {
|
||||
controller.addCraftingTask(new BasicCraftingTask(pattern));
|
||||
controller.addCraftingTaskForPattern(pattern);
|
||||
|
||||
childTasks[i] = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user