fixes #126 and fixes #127

This commit is contained in:
modmuss50 2015-08-26 09:52:56 +01:00
parent 103c0b79e4
commit cb59fff1f0
5 changed files with 1393 additions and 1373 deletions

View file

@ -31,7 +31,7 @@ public class BlockStorage2 extends Block {
public static final String[] types = new String[]
{"tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel",
"iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellow_garnet", "red_garnet"};
"iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellowGarnet", "redGarnet"};
private IIcon[] textures;

View file

@ -1,6 +1,5 @@
package techreborn.init;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -11,18 +10,35 @@ import net.minecraftforge.oredict.OreDictionary;
import org.apache.commons.lang3.ArrayUtils;
import techreborn.api.TechRebornAPI;
import techreborn.api.recipe.RecipeHandler;
import techreborn.api.recipe.machines.*;
import techreborn.api.recipe.machines.AlloySmelterRecipe;
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.api.recipe.machines.LatheRecipe;
import techreborn.api.recipe.machines.PlateCuttingMachineRecipe;
import techreborn.blocks.BlockMachineFrame;
import techreborn.blocks.BlockOre;
import techreborn.blocks.BlockStorage;
import techreborn.blocks.BlockStorage2;
import techreborn.config.ConfigTechReborn;
import techreborn.farm.FarmTree;
import techreborn.items.*;
import techreborn.items.ItemCells;
import techreborn.items.ItemDusts;
import techreborn.items.ItemDustsSmall;
import techreborn.items.ItemDustsTiny;
import techreborn.items.ItemGems;
import techreborn.items.ItemIngots;
import techreborn.items.ItemParts;
import techreborn.items.ItemPlates;
import techreborn.items.ItemRods;
import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper;
import java.util.ArrayList;
import java.security.InvalidParameterException;
public class ModRecipes {
public static ConfigTechReborn config;
@ -184,20 +200,24 @@ public class ModRecipes {
static void addShapelessRecipes() {
for (String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)) {
ItemStack item = null;
try {
item = ItemIngots.getIngotByName(name, 9);
} catch (InvalidParameterException e) {
try {
ItemStack item = ItemIngots.getIngotByName(name, 9);
if (item == null) {
item = ItemGems.getGemByName(name, 9);
} catch (InvalidParameterException e2) {
continue;
}
}
if (item == null) {
continue;
}
GameRegistry.addShapelessRecipe(BlockStorage.getStorageBlockByName(name), item);
GameRegistry.addShapelessRecipe(BlockStorage.getStorageBlockByName(name), item, item, item, item, item, item, item, item, item);
GameRegistry.addShapelessRecipe(item, BlockStorage.getStorageBlockByName(name, 9));
} catch (Exception e) {
//Iridium reinforced tungstensteel, etc.
}
}
for (String name : ItemDustsSmall.types) {
@ -207,6 +227,7 @@ public class ModRecipes {
GameRegistry.addShapelessRecipe(ItemDusts.getDustByName(name, 1), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name), ItemDustsTiny.getTinyDustByName(name));
}
// CraftingHelper.addShapelessOreRecipe(new ItemStack(ModItems.gems, 9, 1), "blockSapphire");
// CraftingHelper.addShapelessOreRecipe(new ItemStack(ModItems.gems, 9, 0), "blockRuby");
// CraftingHelper.addShapelessOreRecipe(new ItemStack(ModItems.gems, 9, 2), "blockGreenSapphire");
@ -256,7 +277,6 @@ public class ModRecipes {
'A', "plateAluminum");
TechRebornAPI.addRollingMachinceRecipe(ItemParts.getPartByName("cupronickelHeatingCoil"),
"NCN", "C C", "NCN",
'N', ItemIngots.getIngotByName("cupronickel"),

View file

@ -99,8 +99,8 @@ tile.techreborn.storage2.iridium_reinforced_stone.name=Iridium Reinforced Stone
tile.techreborn.storage2.ruby.name=Block of Ruby
tile.techreborn.storage2.sapphire.name=Block of Sapphire
tile.techreborn.storage2.peridot.name=Block of Peridot
tile.techreborn.storage2.yellow_garnet.name=Block of Yellow Garnet
tile.techreborn.storage2.red_garnet.name=Block of Red Garnet
tile.techreborn.storage2.yellowGarnet.name=Block of Yellow Garnet
tile.techreborn.storage2.redGarnet.name=Block of Red Garnet
tile.techreborn.farm.name=Farm