1117 lines of new recipes?
Added a new recipe manager to allow us to list the missing items that need to be reimplemented.
This commit is contained in:
parent
fb1d6f1074
commit
9268fa4d55
10 changed files with 1216 additions and 380 deletions
|
@ -19,6 +19,7 @@ import reborncore.common.packets.AddDiscriminatorEvent;
|
|||
import reborncore.common.util.LogHelper;
|
||||
import reborncore.common.util.VersionChecker;
|
||||
import techreborn.achievement.TRAchievements;
|
||||
import techreborn.api.TechRebornAPI;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.recipeConfig.RecipeConfigManager;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -52,6 +53,9 @@ public class Core {
|
|||
|
||||
public static LogHelper logHelper = new LogHelper(new ModInfo());
|
||||
|
||||
private static RecipeCompact recipeCompact;
|
||||
private static File configDir;
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preinit(FMLPreInitializationEvent event) {
|
||||
event.getModMetadata().version = ModInfo.MOD_VERSION;
|
||||
|
@ -63,6 +67,10 @@ public class Core {
|
|||
.replace(ModInfo.MOD_ID, "TechReborn");
|
||||
|
||||
config = ConfigTechReborn.initialize(new File(path));
|
||||
configDir = event.getModConfigurationDirectory();
|
||||
|
||||
recipeCompact = new RecipeCompact();
|
||||
TechRebornAPI.recipeCompact = recipeCompact;
|
||||
|
||||
for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
|
||||
compatModule.preInit(event);
|
||||
|
@ -126,6 +134,7 @@ public class Core {
|
|||
// RecipeHandler.scanForDupeRecipes();
|
||||
|
||||
//RecipeConfigManager.save();
|
||||
recipeCompact.saveMissingItems(configDir);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package techreborn.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.recipe.IRecipeCompact;
|
||||
|
||||
public final class TechRebornAPI {
|
||||
|
||||
public static IRecipeCompact recipeCompact;
|
||||
|
||||
public static void addRollingOreMachinceRecipe(ItemStack output,
|
||||
Object... components) {
|
||||
RollingMachineRecipe.instance.addShapedOreRecipe(output, components);
|
||||
|
|
8
src/main/java/techreborn/api/recipe/IRecipeCompact.java
Normal file
8
src/main/java/techreborn/api/recipe/IRecipeCompact.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package techreborn.api.recipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IRecipeCompact {
|
||||
|
||||
ItemStack getItem(String name);
|
||||
}
|
|
@ -62,9 +62,9 @@ public class RecipeHandler {
|
|||
if (recipeList.contains(recipe)) {
|
||||
return;
|
||||
}
|
||||
if (!RecipeConfigManager.canLoadRecipe(recipe)) {
|
||||
return;
|
||||
}
|
||||
// if (!RecipeConfigManager.canLoadRecipe(recipe)) {
|
||||
// return;
|
||||
// }
|
||||
if (!machineNames.contains(recipe.getRecipeName())) {
|
||||
machineNames.add(recipe.getRecipeName());
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package techreborn.compat;
|
|||
import net.minecraftforge.fml.common.Loader;
|
||||
import techreborn.compat.minetweaker.MinetweakerCompat;
|
||||
import techreborn.compat.recipes.RecipesBiomesOPlenty;
|
||||
import techreborn.compat.recipes.RecipesStandalone;
|
||||
import techreborn.compat.waila.CompatModuleWaila;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
|
@ -33,7 +32,6 @@ public class CompatManager {
|
|||
isGregTechLoaded = true;
|
||||
}
|
||||
registerCompact(CompatModuleWaila.class, "Waila");
|
||||
registerCompact(RecipesStandalone.class);
|
||||
registerCompact(MinetweakerCompat.class, "MineTweaker3");
|
||||
registerCompact(RecipesBiomesOPlenty.class, "BiomesOPlenty");
|
||||
}
|
||||
|
|
|
@ -1,375 +0,0 @@
|
|||
package techreborn.compat.recipes;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import reborncore.common.util.CraftingHelper;
|
||||
import techreborn.api.reactor.FusionReactorRecipe;
|
||||
import techreborn.api.reactor.FusionReactorRecipeHelper;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
|
||||
import techreborn.blocks.BlockOre;
|
||||
import techreborn.compat.ICompatModule;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.items.*;
|
||||
|
||||
public class RecipesStandalone implements ICompatModule {
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
addShappedIc2Recipes();
|
||||
addTRRecipes();
|
||||
|
||||
FusionReactorRecipeHelper.registerRecipe(new FusionReactorRecipe(ItemCells.getCellByName("wolframium"), ItemCells.getCellByName("lithium"), BlockOre.getOreByName("Iridium"), 90000000, -2048, 1024));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
|
||||
}
|
||||
|
||||
public void addTRRecipes() {
|
||||
//General
|
||||
CraftingHelper.addShapelessOreRecipe(new ItemStack(ModItems.manuel), "plateIron", Items.book);
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(
|
||||
ItemParts.getPartByName("machineParts", 16),
|
||||
"CSC", "SCS", "CSC",
|
||||
'S', "ingotSteel",
|
||||
'C', ItemParts.getPartByName("basicCircuitBoard"));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("energyFlowCircuit", 4),
|
||||
"ATA", "LIL", "ATA",
|
||||
'T', "plateTungsten",
|
||||
'I', "plateIridium",
|
||||
'A', ItemParts.getPartByName("advancedCircuitBoard"),
|
||||
'L', new ItemStack(Items.emerald));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("superconductor", 4),
|
||||
"CCC", "TIT", "EEE",
|
||||
'E', ItemParts.getPartByName("energyFlowCircuit"),
|
||||
'C', ItemParts.getPartByName("heliumCoolantSimple"),
|
||||
'T', "ingotTungsten",
|
||||
'I', "plateIridium");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.lapotronicOrb),
|
||||
"LLL", "LPL", "LLL",
|
||||
'L', new ItemStack(Items.emerald),
|
||||
'P', "plateIridium");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.industrialSawmill),
|
||||
"PAP",
|
||||
"SSS",
|
||||
"ACA",
|
||||
'P', new ItemStack(Blocks.hopper),
|
||||
'A', ItemParts.getPartByName("advancedCircuitBoard"),
|
||||
'S', ItemParts.getPartByName("diamondSawBlade"),
|
||||
'C', new ItemStack(ModBlocks.MachineCasing, 1, 2));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ComputerCube),
|
||||
"DME", "MAM", "EMD",
|
||||
'E', ItemParts.getPartByName("energyFlowCircuit"),
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'M', ItemParts.getPartByName("computerMonitor"),
|
||||
'A', new ItemStack(ModBlocks.MachineCasing, 1, 2));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.MatterFabricator),
|
||||
"ETE", "AOA", "ETE",
|
||||
'E', ItemParts.getPartByName("energyFlowCircuit"),
|
||||
'T', new ItemStack(Items.enchanted_book),
|
||||
'A', ModBlocks.HighAdvancedMachineBlock,
|
||||
'O', ModItems.lapotronicOrb);
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.thermalGenerator),
|
||||
"III", "IHI", "CGC",
|
||||
'I', "plateInvar",
|
||||
'H', new ItemStack(Blocks.glass),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(ModBlocks.heatGenerator));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.thermalGenerator),
|
||||
"AAA", "AHA", "CGC",
|
||||
'A', "plateAluminum",
|
||||
'H', new ItemStack(Blocks.glass),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(ModBlocks.heatGenerator));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.heatGenerator),
|
||||
"III", "IHI", "CGC",
|
||||
'I', "plateIron",
|
||||
'H', new ItemStack(Blocks.iron_bars),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Gasturbine),
|
||||
"IAI", "WGW", "IAI",
|
||||
'I', "plateInvar",
|
||||
'A', ItemParts.getPartByName("advancedCircuitBoard"),
|
||||
'W', new ItemStack(Blocks.iron_bars),
|
||||
'G', new ItemStack(Blocks.glass));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Gasturbine),
|
||||
"IAI", "WGW", "IAI",
|
||||
'I', "plateAluminum",
|
||||
'A', ItemParts.getPartByName("advancedCircuitBoard"),
|
||||
'W', new ItemStack(Blocks.iron_bars),
|
||||
'G', new ItemStack(Blocks.glass));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Semifluidgenerator),
|
||||
"III", "IHI", "CGC",
|
||||
'I', "plateIron",
|
||||
'H', new ItemStack(Blocks.glass),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Semifluidgenerator),
|
||||
"AAA", "AHA", "CGC",
|
||||
'A', "plateAluminum",
|
||||
'H', new ItemStack(Blocks.glass),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.DieselGenerator),
|
||||
"III", "I I", "CGC",
|
||||
'I', "plateIron",
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.DieselGenerator),
|
||||
"AAA", "A A", "CGC",
|
||||
'A', "plateAluminum",
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.MagicalAbsorber),
|
||||
"CSC", "IBI", "CAC",
|
||||
'C', "circuitMaster",
|
||||
'S', "craftingSuperconductor",
|
||||
'B', Blocks.beacon,
|
||||
'A', ModBlocks.Magicenergeyconverter,
|
||||
'I', "plateIridium");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Magicenergeyconverter),
|
||||
"CTC", "PBP", "CLC",
|
||||
'C', "circuitAdvanced",
|
||||
'P', "platePlatinum",
|
||||
'B', Blocks.beacon,
|
||||
'L', new ItemStack(Items.emerald),
|
||||
'T', new ItemStack(Items.ender_eye));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Dragoneggenergysiphoner),
|
||||
"CTC", "ISI", "CBC",
|
||||
'I', "plateIridium",
|
||||
'C', "circuitMaster",
|
||||
'B', "batteryUltimate",
|
||||
'S', ModBlocks.Supercondensator,
|
||||
'T', new ItemStack(Items.ender_eye));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.centrifuge),
|
||||
"SCS", "BEB", "SCS",
|
||||
'S', "plateSteel",
|
||||
'C', "circuitAdvanced",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'E', new ItemStack(ModBlocks.AlloyFurnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.IndustrialElectrolyzer),
|
||||
"SXS", "CEC", "SMS",
|
||||
'S', "plateSteel",
|
||||
'C', "circuitAdvanced",
|
||||
'X', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'E', new ItemStack(Blocks.enchanting_table),
|
||||
'M', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.BlastFurnace),
|
||||
"CHC", "HBH", "FHF",
|
||||
'H', new ItemStack(ModItems.parts, 1, 17),
|
||||
'C', "circuitAdvanced",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'F', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Grinder),
|
||||
"ECP", "GGG", "CBC",
|
||||
'E', ModBlocks.IndustrialElectrolyzer,
|
||||
'P', new ItemStack(Blocks.iron_bars),
|
||||
'C', "circuitAdvanced",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'G', "craftingGrinder");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ImplosionCompressor),
|
||||
"ABA", "CPC", "ABA",
|
||||
'A', new ItemStack(Items.gold_ingot),
|
||||
'C', "circuitAdvanced",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'P', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.VacuumFreezer),
|
||||
"SPS", "CGC", "SPS",
|
||||
'S', "plateSteel",
|
||||
'C', "circuitAdvanced",
|
||||
'G', new ItemStack(Blocks.glass),
|
||||
'P', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Distillationtower),
|
||||
"CMC", "PBP", "EME",
|
||||
'E', ModBlocks.IndustrialElectrolyzer,
|
||||
'M', "circuitMaster",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'C', ModBlocks.centrifuge,
|
||||
'P', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.AlloyFurnace),
|
||||
"III", "F F", "III",
|
||||
'I', "plateIron",
|
||||
'F', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ChemicalReactor),
|
||||
"IMI", "CPC", "IEI",
|
||||
'I', "plateInvar",
|
||||
'C', "circuitAdvanced",
|
||||
'M', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'P', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'E', new ItemStack(ModBlocks.AlloyFurnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ChemicalReactor),
|
||||
"AMA", "CPC", "AEA",
|
||||
'A', "plateAluminum",
|
||||
'C', "circuitAdvanced",
|
||||
'M', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'P', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'E', new ItemStack(ModBlocks.AlloyFurnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.RollingMachine),
|
||||
"PCP", "MBM", "PCP",
|
||||
'P', "craftingPiston",
|
||||
'C', "circuitAdvanced",
|
||||
'M', new ItemStack(ModBlocks.AlloyFurnace),
|
||||
'B', new ItemStack(ModBlocks.AlloyFurnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ElectricCraftingTable),
|
||||
"ITI", "IBI", "ICI",
|
||||
'I', "plateIron",
|
||||
'C', "circuitAdvanced",
|
||||
'T', "crafterWood",
|
||||
'B', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ElectricCraftingTable),
|
||||
"ATA", "ABA", "ACA",
|
||||
'A', "plateAluminum",
|
||||
'C', "circuitAdvanced",
|
||||
'T', "crafterWood",
|
||||
'B', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ChunkLoader),
|
||||
"SCS", "CMC", "SCS",
|
||||
'S', "plateSteel",
|
||||
'C', "circuitMaster",
|
||||
'M', new ItemStack(ModItems.parts, 1, 39));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Lesu),
|
||||
" L ", "CBC", " M ",
|
||||
'L', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'C', "circuitAdvanced",
|
||||
'M', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'B', ModBlocks.LesuStorage);
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.HighAdvancedMachineBlock),
|
||||
"CTC", "TBT", "CTC",
|
||||
'C', "plateChrome",
|
||||
'T', "plateTitanium",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.MachineCasing, 4, 0),
|
||||
"III", "CBC", "III",
|
||||
'I', "plateIron",
|
||||
'C', "circuitBasic",
|
||||
'B', new ItemStack(Blocks.furnace));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.MachineCasing, 4, 1),
|
||||
"SSS", "CBC", "SSS",
|
||||
'S', "plateSteel",
|
||||
'C', "circuitAdvanced",
|
||||
'B', new ItemStack(ModBlocks.MachineCasing, 1, 2));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.MachineCasing, 4, 2),
|
||||
"HHH", "CBC", "HHH",
|
||||
'H', "plateChrome",
|
||||
'C', "circuitElite",
|
||||
'B', ModBlocks.HighAdvancedMachineBlock);
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.quantumChest),
|
||||
"DCD", "ATA", "DQD",
|
||||
'D', ItemParts.getPartByName("dataOrb"),
|
||||
'C', ItemParts.getPartByName("computerMonitor"),
|
||||
'A', ModBlocks.HighAdvancedMachineBlock,
|
||||
'Q', ModBlocks.digitalChest,
|
||||
'T', new ItemStack(Items.ender_eye));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.PlasmaGenerator),
|
||||
"PPP", "PTP", "CGC",
|
||||
'P', ItemPlates.getPlateByName("tungstensteel"),
|
||||
'T', new ItemStack(ModBlocks.MachineCasing, 1, 2),
|
||||
'G', new ItemStack(Blocks.furnace),
|
||||
'C', ItemParts.getPartByName("energyFlowCircuit")
|
||||
);
|
||||
|
||||
|
||||
//UU
|
||||
if (ConfigTechReborn.UUrecipesIridiamOre)
|
||||
CraftingHelper.addShapedOreRecipe(ItemIngots.getIngotByName("iridium"),
|
||||
"UUU",
|
||||
" U ",
|
||||
"UUU",
|
||||
'U', ModItems.uuMatter);
|
||||
|
||||
|
||||
//Blast Furnace
|
||||
RecipeHandler.addRecipe(new BlastFurnaceRecipe(ItemCells.getCellByName("silicon", 2), null, ItemPlates.getPlateByName("silicon"), ItemCells.getCellByName("empty"), 1000, 120, 1500));
|
||||
|
||||
//CentrifugeRecipes
|
||||
|
||||
}
|
||||
|
||||
static void addShappedIc2Recipes() {
|
||||
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("iridiumAlloyIngot"),
|
||||
"IAI", "ADA", "IAI",
|
||||
'I', ItemIngots.getIngotByName("iridium"),
|
||||
'D', ItemDusts.getDustByName("diamond"),
|
||||
'A', new ItemStack(Items.diamond));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.lithiumBatpack, 1, OreDictionary.WILDCARD_VALUE),
|
||||
"BCB", "BPB", "B B",
|
||||
'B', new ItemStack(ModItems.lithiumBattery),
|
||||
'P', "plateAluminum",
|
||||
'C', ItemParts.getPartByName("advancedCircuitBoard"));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.lithiumBattery, 1, OreDictionary.WILDCARD_VALUE),
|
||||
" C ", "PFP", "PFP",
|
||||
'F', ItemCells.getCellByName("lithium"),
|
||||
'P', "plateAluminum",
|
||||
'C', new ItemStack(Items.golden_chestplate));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.lapotronpack, 1, OreDictionary.WILDCARD_VALUE),
|
||||
"FOF", "SPS", "FIF",
|
||||
'F', ItemParts.getPartByName("energyFlowCircuit"),
|
||||
'O', new ItemStack(ModItems.lapotronicOrb),
|
||||
'S', ItemParts.getPartByName("superConductor"),
|
||||
'I', "ingotIridium",
|
||||
'P', new ItemStack(ModItems.lapotronpack));
|
||||
}
|
||||
|
||||
}
|
|
@ -74,6 +74,8 @@ public class ModItems {
|
|||
|
||||
public static Item upgrades;
|
||||
|
||||
public static Item missingRecipe;
|
||||
|
||||
|
||||
public static void init() throws InstantiationException, IllegalAccessException {
|
||||
gems = new ItemGems();
|
||||
|
@ -265,6 +267,9 @@ public class ModItems {
|
|||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fluidwolframium", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketWolframium), new ItemStack(Items.bucket));
|
||||
BucketHandler.INSTANCE.buckets.put(ModFluids.BlockFluidWolframium.getDefaultState(), bucketWolframium);
|
||||
|
||||
missingRecipe = new ItemMissingRecipe().setUnlocalizedName("missingRecipe");
|
||||
GameRegistry.registerItem(missingRecipe, "mssingRecipe");
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
64
src/main/java/techreborn/init/RecipeCompact.java
Normal file
64
src/main/java/techreborn/init/RecipeCompact.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.recipe.IRecipeCompact;
|
||||
import techreborn.items.ItemCells;
|
||||
import techreborn.items.ItemIngots;
|
||||
import techreborn.items.ItemPlates;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class RecipeCompact implements IRecipeCompact {
|
||||
|
||||
HashMap<String, ItemStack> recipes = new HashMap<>();
|
||||
|
||||
ArrayList<String> missingItems = new ArrayList<>();
|
||||
|
||||
public RecipeCompact() {
|
||||
recipes.put("industrialDiamond", new ItemStack(Items.diamond));
|
||||
recipes.put("industrialTnt", new ItemStack(Blocks.tnt));
|
||||
recipes.put("copperIngot", ItemIngots.getIngotByName("copper"));
|
||||
recipes.put("tinIngot", ItemIngots.getIngotByName("tin"));
|
||||
recipes.put("bronzeIngot", ItemIngots.getIngotByName("bronze"));
|
||||
recipes.put("leadIngot", ItemIngots.getIngotByName("lead"));
|
||||
recipes.put("silverIngot", ItemIngots.getIngotByName("silver"));
|
||||
recipes.put("iridiumOre", ItemIngots.getIngotByName("Iridium"));
|
||||
recipes.put("plateiron", ItemPlates.getPlateByName("iron"));
|
||||
recipes.put("iridiumPlate", ItemPlates.getPlateByName("iridium"));
|
||||
recipes.put("cell", ItemCells.getCellByName("empty"));
|
||||
recipes.put("airCell", ItemCells.getCellByName("empty"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItem(String name) {
|
||||
if(!recipes.containsKey(name)){
|
||||
if(!missingItems.contains(name)){
|
||||
missingItems.add(name);
|
||||
}
|
||||
return new ItemStack(ModItems.missingRecipe);
|
||||
} else {
|
||||
return recipes.get(name);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveMissingItems(File mcDir) throws IOException {
|
||||
File missingItemsFile = new File(mcDir, "TechRebornMissingItems.txt");
|
||||
if(missingItemsFile.exists()){
|
||||
missingItemsFile.delete();
|
||||
}
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(missingItemsFile));
|
||||
for(String str : missingItems){
|
||||
writer.write(str);
|
||||
writer.newLine();
|
||||
}
|
||||
writer.close();
|
||||
}
|
||||
|
||||
}
|
7
src/main/java/techreborn/items/ItemMissingRecipe.java
Normal file
7
src/main/java/techreborn/items/ItemMissingRecipe.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package techreborn.items;
|
||||
|
||||
/**
|
||||
* Created by Mark on 19/02/2016.
|
||||
*/
|
||||
public class ItemMissingRecipe extends ItemTR {
|
||||
}
|
Loading…
Reference in a new issue