From f7f93833e442f0dfd1551b87efee8506f0afdf47 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Mon, 28 Oct 2013 18:27:04 -0400 Subject: [PATCH] Worked on a few recipes --- src/dark/api/ColorCode.java | 3 +- src/dark/core/common/CoreRecipeLoader.java | 8 ++--- src/dark/core/common/DarkMain.java | 2 -- src/dark/core/common/items/ItemParts.java | 38 ++++++++++++++++++++-- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/src/dark/api/ColorCode.java b/src/dark/api/ColorCode.java index 5b14b14e..b01c815e 100644 --- a/src/dark/api/ColorCode.java +++ b/src/dark/api/ColorCode.java @@ -4,7 +4,6 @@ import java.awt.Color; public enum ColorCode { - BLACK("Black", Color.black), RED("Red", Color.red), GREEN("Green", Color.green), @@ -38,7 +37,7 @@ public enum ColorCode } /** gets a ColorCode from any of the following - * + * * @param obj - Integer,String,LiquidData,ColorCode * @return Color NONE if it can't find it */ public static ColorCode get(Object obj) diff --git a/src/dark/core/common/CoreRecipeLoader.java b/src/dark/core/common/CoreRecipeLoader.java index 9898b6ee..56dddad3 100644 --- a/src/dark/core/common/CoreRecipeLoader.java +++ b/src/dark/core/common/CoreRecipeLoader.java @@ -64,7 +64,7 @@ public class CoreRecipeLoader extends RecipeLoader } if (blockWire instanceof BlockWire) { - new RecipeGrid(new ItemStack(blockWire, 1, 0), 3, 3).setRowOne(Block.cloth, Block.cloth, Block.cloth).setRowTwo(copper, copper, copper).setRowThree(Block.cloth, Block.cloth, Block.cloth).RegisterRecipe(); + new RecipeGrid(new ItemStack(blockWire, 16, 1), 3, 3).setRowOne(Block.cloth, Block.cloth, Block.cloth).setRowTwo(copper, copper, copper).setRowThree(Block.cloth, Block.cloth, Block.cloth).RegisterRecipe(); } if (itemDiggingTool instanceof ItemCommonTool) { @@ -87,16 +87,16 @@ public class CoreRecipeLoader extends RecipeLoader if (itemParts instanceof ItemParts) { leatherSeal = new ItemStack(itemParts, 1, Parts.Seal.ordinal()); - slimeSeal = new ItemStack(itemParts, 1, Parts.SlimeSeal.ordinal()); + slimeSeal = new ItemStack(itemParts, 1, Parts.GasSeal.ordinal()); valvePart = new ItemStack(itemParts, 1, Parts.Tank.ordinal()); unfinishedTank = new ItemStack(itemParts, 1, Parts.Tank.ordinal()); // seal - GameRegistry.addRecipe(new ShapedOreRecipe(this.setStackSize(leatherSeal, 16), new Object[] { "LL","LL", 'L', Item.leather })); + GameRegistry.addRecipe(this.setStackSize(leatherSeal, 16), new Object[] { "LL", "LL", 'L', Item.leather }); // slime steal new RecipeGrid(this.setStackSize(slimeSeal, 4)).setRowOne(null, leatherSeal, null).setRowTwo(leatherSeal, Item.slimeBall, leatherSeal).setRowThree(null, leatherSeal, null).RegisterRecipe(); // part valve - new RecipeGrid(valvePart, 3, 1).setRowOne(EnumMaterial.getStack(EnumMaterial.IRON, EnumOrePart.TUBE, 1), Block.lever, EnumMaterial.getStack(EnumMaterial.IRON, EnumOrePart.TUBE, 1)).RegisterRecipe(); + GameRegistry.addRecipe(new ShapedOreRecipe(valvePart, new Object[] { "PLP", 'P', "ironPipe", 'L', Block.lever })); // unfinished tank new RecipeGrid(unfinishedTank).setRowOne(null, Item.ingotIron, null).setRowTwo(Item.ingotIron, null, Item.ingotIron).setRowThree(null, Item.ingotIron, null).RegisterRecipe(); new RecipeGrid(unfinishedTank).setRowOne(null, bronze, null).setRowTwo(bronze, null, bronze).setRowThree(null, bronze, null).RegisterRecipe(); diff --git a/src/dark/core/common/DarkMain.java b/src/dark/core/common/DarkMain.java index 40b6246e..727cd576 100644 --- a/src/dark/core/common/DarkMain.java +++ b/src/dark/core/common/DarkMain.java @@ -157,13 +157,11 @@ public class DarkMain extends ModPrefab OreDictionary.registerOre(mat.simpleName + "rubble", mat.getStack(EnumOrePart.RUBBLE, 1)); OreDictionary.registerOre("rubble" + mat.simpleName, mat.getStack(EnumOrePart.RUBBLE, 1)); } - //Dust recipes if (mat.shouldCreateItem(EnumOrePart.DUST)) { OreDictionary.registerOre(mat.simpleName + "dust", mat.getStack(EnumOrePart.DUST, 1)); OreDictionary.registerOre("dust" + mat.simpleName, mat.getStack(EnumOrePart.DUST, 1)); } - // Salvaging recipe if (mat.shouldCreateItem(EnumOrePart.SCRAPS)) { diff --git a/src/dark/core/common/items/ItemParts.java b/src/dark/core/common/items/ItemParts.java index 2cce89a7..c463d4bc 100644 --- a/src/dark/core/common/items/ItemParts.java +++ b/src/dark/core/common/items/ItemParts.java @@ -6,17 +6,21 @@ import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; +import net.minecraftforge.common.Configuration; +import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import dark.core.common.CoreRecipeLoader; import dark.core.common.DarkMain; +import dark.core.prefab.IExtraInfo.IExtraItemInfo; import dark.core.prefab.ModPrefab; import dark.core.prefab.items.ItemBasic; /** A meta data item containing parts of various crafting recipes. These parts do not do anything but * allow new crafting recipes to be created. - * + * * @author DarkGuardsman */ -public class ItemParts extends ItemBasic +public class ItemParts extends ItemBasic implements IExtraItemInfo { public ItemParts() { @@ -80,7 +84,7 @@ public class ItemParts extends ItemBasic public static enum Parts { Seal("LeatherSeal"), - SlimeSeal("SlimeSeal"), + GasSeal("GasSeal"), Tank("UnfinishedTank"), Valve("ValvePart"), MiningIcon("miningIcon", false); @@ -99,5 +103,33 @@ public class ItemParts extends ItemBasic this(name); this.show = show; } + + public ItemStack getStack() + { + return new ItemStack(CoreRecipeLoader.itemParts,1,this.ordinal()); + } + } + + @Override + public boolean hasExtraConfigs() + { + return false; + } + + @Override + public void loadExtraConfigs(Configuration config) + { + // TODO Auto-generated method stub + + } + + @Override + public void loadOreNames() + { + for (Parts part : Parts.values()) + { + OreDictionary.registerOre(part.name, part.getStack()); + } + } }