Recipe for crafting cpu + crafting unit
This commit is contained in:
@@ -14,10 +14,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import refinedstorage.RefinedStorage;
|
||||
import refinedstorage.RefinedStorageBlocks;
|
||||
import refinedstorage.RefinedStorageItems;
|
||||
import refinedstorage.block.BlockBase;
|
||||
import refinedstorage.block.EnumControllerType;
|
||||
import refinedstorage.block.EnumGridType;
|
||||
import refinedstorage.block.EnumStorageType;
|
||||
import refinedstorage.block.*;
|
||||
import refinedstorage.gui.GuiHandler;
|
||||
import refinedstorage.item.*;
|
||||
import refinedstorage.network.*;
|
||||
@@ -399,6 +396,24 @@ public class CommonProxy {
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeStorage(EnumStorageType.TYPE_16K, ItemStoragePart.TYPE_16K));
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeStorage(EnumStorageType.TYPE_64K, ItemStoragePart.TYPE_64K));
|
||||
|
||||
// Crafting Unit
|
||||
GameRegistry.addShapedRecipe(new ItemStack(RefinedStorageBlocks.CRAFTING_UNIT),
|
||||
"ECE",
|
||||
"PMP",
|
||||
"EDE",
|
||||
'P', new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_BASIC),
|
||||
'E', new ItemStack(RefinedStorageItems.QUARTZ_ENRICHED_IRON),
|
||||
'M', new ItemStack(RefinedStorageBlocks.MACHINE_CASING),
|
||||
'C', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_CONSTRUCTION),
|
||||
'D', new ItemStack(RefinedStorageItems.CORE, 1, ItemCore.TYPE_DESTRUCTION)
|
||||
);
|
||||
|
||||
// Crafting CPUs
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeCraftingCPU(EnumCraftingCPUType.TYPE_1K, ItemStoragePart.TYPE_1K));
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeCraftingCPU(EnumCraftingCPUType.TYPE_4K, ItemStoragePart.TYPE_4K));
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeCraftingCPU(EnumCraftingCPUType.TYPE_16K, ItemStoragePart.TYPE_16K));
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeCraftingCPU(EnumCraftingCPUType.TYPE_64K, ItemStoragePart.TYPE_64K));
|
||||
|
||||
// Interface
|
||||
SoldererRegistry.addRecipe(new SoldererRecipeInterface());
|
||||
}
|
||||
|
||||
41
src/main/java/refinedstorage/tile/solderer/SoldererRecipeCraftingCPU.java
Executable file
41
src/main/java/refinedstorage/tile/solderer/SoldererRecipeCraftingCPU.java
Executable file
@@ -0,0 +1,41 @@
|
||||
package refinedstorage.tile.solderer;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import refinedstorage.RefinedStorageBlocks;
|
||||
import refinedstorage.RefinedStorageItems;
|
||||
import refinedstorage.block.EnumCraftingCPUType;
|
||||
import refinedstorage.item.ItemBlockStorage;
|
||||
import refinedstorage.item.ItemProcessor;
|
||||
|
||||
public class SoldererRecipeCraftingCPU implements ISoldererRecipe {
|
||||
private EnumCraftingCPUType type;
|
||||
private int storagePart;
|
||||
|
||||
public SoldererRecipeCraftingCPU(EnumCraftingCPUType type, int storagePart) {
|
||||
this.type = type;
|
||||
this.storagePart = storagePart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRow(int row) {
|
||||
if (row == 0) {
|
||||
return new ItemStack(RefinedStorageItems.STORAGE_PART, 1, storagePart);
|
||||
} else if (row == 1) {
|
||||
return new ItemStack(RefinedStorageBlocks.CRAFTING_UNIT);
|
||||
} else if (row == 2) {
|
||||
return new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getResult() {
|
||||
return ItemBlockStorage.initNBT(new ItemStack(RefinedStorageBlocks.CRAFTING_CPU, 1, type.getId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDuration() {
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user