Worked on a few recipes

This commit is contained in:
DarkGuardsman 2013-10-28 18:27:04 -04:00
parent ae4e57c6e5
commit f7f93833e4
4 changed files with 40 additions and 11 deletions

View file

@ -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)

View file

@ -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();

View file

@ -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))
{

View file

@ -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());
}
}
}