Bugfixes
This commit is contained in:
		| @@ -3,6 +3,13 @@ | |||||||
| ### 0.6 | ### 0.6 | ||||||
| WIP | WIP | ||||||
|  |  | ||||||
|  | **TODO** | ||||||
|  | - Saving crafting task state | ||||||
|  | - Cancelling crafting tasks | ||||||
|  | - "Craft if needed" upgrade on exporter, constructor and interface | ||||||
|  | - Textures | ||||||
|  | - Update wiki | ||||||
|  |  | ||||||
| ### 0.5.6 | ### 0.5.6 | ||||||
| **Bugfixes** | **Bugfixes** | ||||||
| - Fix sorting crash | - Fix sorting crash | ||||||
|   | |||||||
| @@ -14,7 +14,10 @@ import net.minecraftforge.fml.relauncher.Side; | |||||||
| import refinedstorage.RefinedStorage; | import refinedstorage.RefinedStorage; | ||||||
| import refinedstorage.RefinedStorageBlocks; | import refinedstorage.RefinedStorageBlocks; | ||||||
| import refinedstorage.RefinedStorageItems; | 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.gui.GuiHandler; | ||||||
| import refinedstorage.item.*; | import refinedstorage.item.*; | ||||||
| import refinedstorage.network.*; | import refinedstorage.network.*; | ||||||
| @@ -235,6 +238,18 @@ public class CommonProxy { | |||||||
|             'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING) |             '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 |         // External Storage | ||||||
|         GameRegistry.addRecipe(new ItemStack(RefinedStorageBlocks.EXTERNAL_STORAGE), |         GameRegistry.addRecipe(new ItemStack(RefinedStorageBlocks.EXTERNAL_STORAGE), | ||||||
|             "CED", |             "CED", | ||||||
|   | |||||||
| @@ -63,6 +63,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|  |  | ||||||
|     private List<CraftingPattern> patterns = new ArrayList<CraftingPattern>(); |     private List<CraftingPattern> patterns = new ArrayList<CraftingPattern>(); | ||||||
|     private List<ICraftingTask> craftingTasks = new ArrayList<ICraftingTask>(); |     private List<ICraftingTask> craftingTasks = new ArrayList<ICraftingTask>(); | ||||||
|  |     private List<ICraftingTask> craftingTasksToAdd = new ArrayList<ICraftingTask>(); | ||||||
|  |  | ||||||
|     private Set<String> visited = new HashSet<String>(); |     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(); |             Iterator<ICraftingTask> craftingTaskIterator = craftingTasks.iterator(); | ||||||
|  |  | ||||||
|             while (craftingTaskIterator.hasNext()) { |             while (craftingTaskIterator.hasNext()) { | ||||||
| @@ -253,7 +257,15 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     public void addCraftingTask(ICraftingTask task) { |     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() { |     public List<CraftingPattern> getPatterns() { | ||||||
| @@ -704,11 +716,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor | |||||||
|  |  | ||||||
|             while (quantity > 0) { |             while (quantity > 0) { | ||||||
|                 if (pattern != null) { |                 if (pattern != null) { | ||||||
|                     if (pattern.isProcessing()) { |                     addCraftingTaskForPattern(pattern); | ||||||
|                         addCraftingTask(new ProcessingCraftingTask(pattern)); |  | ||||||
|                     } else { |  | ||||||
|                         addCraftingTask(new BasicCraftingTask(pattern)); |  | ||||||
|                     } |  | ||||||
|  |  | ||||||
|                     quantity -= quantityPerRequest; |                     quantity -= quantityPerRequest; | ||||||
|                 } else { |                 } else { | ||||||
|   | |||||||
| @@ -36,7 +36,7 @@ public class BasicCraftingTask implements ICraftingTask { | |||||||
|                     CraftingPattern pattern = controller.getPatternForItem(input); |                     CraftingPattern pattern = controller.getPatternForItem(input); | ||||||
|  |  | ||||||
|                     if (pattern != null) { |                     if (pattern != null) { | ||||||
|                         controller.addCraftingTask(new BasicCraftingTask(pattern)); |                         controller.addCraftingTaskForPattern(pattern); | ||||||
|  |  | ||||||
|                         childTasks[i] = true; |                         childTasks[i] = true; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Raoul Van den Berge
					Raoul Van den Berge