use of net.minecraftforge.oredict.ShapedOreRecipe in project ICBM-Classic by BuiltBrokenModding.
the class TileLauncherBase method genRecipes.
@Override
public void genRecipes(List<IRecipe> recipes) {
// Missile Launcher Platform
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchBase, 1, 0), "! !", "!C!", "!!!", '!', UniversalRecipe.SECONDARY_METAL.get(), 'C', UniversalRecipe.CIRCUIT_T1.get()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchBase, 1, 1), "! !", "!C!", "!@!", '@', new ItemStack(ICBMClassic.blockLaunchBase, 1, 0), '!', UniversalRecipe.PRIMARY_METAL.get(), 'C', UniversalRecipe.CIRCUIT_T2.get()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchBase, 1, 2), "! !", "!C!", "!@!", '@', new ItemStack(ICBMClassic.blockLaunchBase, 1, 1), '!', UniversalRecipe.PRIMARY_PLATE.get(), 'C', UniversalRecipe.CIRCUIT_T3.get()));
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project ICBM-Classic by BuiltBrokenModding.
the class TileEMPTower method genRecipes.
@Override
public void genRecipes(List<IRecipe> recipes) {
Object[] items = { "batteryBox", InventoryUtility.getItemStack("IC2:blockElectric", 0), InventoryUtility.getItemStack("ThermalExpansion:Frame", 5), InventoryUtility.getItemStack("Mekanism:EnergyCube", 0) };
boolean registered = false;
for (Object object : items) {
if (object != null && (!(object instanceof String) || OreDictionary.doesOreNameExist((String) object))) {
recipes.add(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockEmpTower, 1, 0), "?W?", "@!@", "?#?", '?', UniversalRecipe.PRIMARY_PLATE.get(), '!', UniversalRecipe.CIRCUIT_T3.get(), '@', object, '#', UniversalRecipe.MOTOR.get(), 'W', UniversalRecipe.WIRE.get()));
registered = true;
}
}
if (!registered) {
recipes.add(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockEmpTower, 1, 0), "?W?", "@!@", "?#?", '?', UniversalRecipe.PRIMARY_PLATE.get(), '!', UniversalRecipe.CIRCUIT_T3.get(), '@', Explosives.EMP.getItemStack(), '#', UniversalRecipe.MOTOR.get(), 'W', UniversalRecipe.WIRE.get()));
}
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project ICBM-Classic by BuiltBrokenModding.
the class TileLauncherScreen method genRecipes.
@Override
public void genRecipes(List<IRecipe> recipes) {
// Missile Launcher Panel
recipes.add(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchScreen, 1, 0), "!!!", "!#!", "!?!", '#', UniversalRecipe.CIRCUIT_T1.get(), '!', Blocks.glass, '?', UniversalRecipe.WIRE.get()));
recipes.add(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchScreen, 1, 1), "!$!", "!#!", "!?!", '#', UniversalRecipe.CIRCUIT_T2.get(), '!', UniversalRecipe.PRIMARY_METAL.get(), '?', UniversalRecipe.WIRE.get(), '$', new ItemStack(ICBMClassic.blockLaunchScreen, 1, 0)));
recipes.add(new ShapedOreRecipe(new ItemStack(ICBMClassic.blockLaunchScreen, 1, 2), "!$!", "!#!", "!?!", '#', UniversalRecipe.CIRCUIT_T3.get(), '!', Items.gold_ingot, '?', UniversalRecipe.WIRE.get(), '$', new ItemStack(ICBMClassic.blockLaunchScreen, 1, 1)));
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project ArsMagica2 by Mithion.
the class GuiArcaneCompendium method getAndAnalyzeRecipe.
private void getAndAnalyzeRecipe() {
if (renderStack == null)
return;
if (renderStack.getItem() == ItemsCommonProxy.essence || renderStack.getItem() == ItemsCommonProxy.deficitCrystal) {
RecipeArsMagica essenceRecipe = RecipesEssenceRefiner.essenceRefinement().recipeFor(renderStack);
if (essenceRecipe != null) {
craftingComponents = essenceRecipe.getRecipeItems();
recipeHeight = 2;
} else {
craftingComponents = null;
}
} else if (renderStack.getItem() instanceof ItemSpellPart) {
ISkillTreeEntry part = SkillManager.instance.getSkill(this.entryName);
if (part == null)
return;
ArrayList<Object> recipe = new ArrayList<Object>();
if (part instanceof ISpellPart) {
Object[] recipeItems = ((ISpellPart) part).getRecipeItems();
SpellRecipeItemsEvent event = new SpellRecipeItemsEvent(SkillManager.instance.getSkillName(part), SkillManager.instance.getShiftedPartID(part), recipeItems);
MinecraftForge.EVENT_BUS.post(event);
recipeItems = event.recipeItems;
if (recipeItems != null) {
for (int i = 0; i < recipeItems.length; ++i) {
Object o = recipeItems[i];
boolean matches = false;
if (o instanceof ItemStack) {
recipe.add(o);
} else if (o instanceof Item) {
recipe.add(new ItemStack((Item) o));
} else if (o instanceof Block) {
recipe.add(new ItemStack((Block) o));
} else if (o instanceof String) {
if (((String) o).startsWith("P:")) {
//potion
String s = ((String) o).substring(2);
int pfx = SpellRecipeManager.parsePotionMeta(s);
recipe.add(new ItemStack(Items.potionitem, 1, pfx));
} else if (((String) o).startsWith("E:")) {
//essence
String s = ((String) o);
try {
int[] types = SpellRecipeManager.ParseEssenceIDs(s);
int type = 0;
for (int t : types) type |= t;
int amount = (Integer) recipeItems[++i];
recipe.add(new ItemStack(ItemsCommonProxy.essence, amount, ItemsCommonProxy.essence.META_MAX + type));
} catch (Throwable t) {
continue;
}
} else {
recipe.add(OreDictionary.getOres((String) o));
}
}
}
}
}
craftingComponents = recipe.toArray();
} else {
IRecipe recipe = RecipeUtilities.getRecipeFor(renderStack);
if (recipe != null) {
renderStack = recipe.getRecipeOutput();
if (recipe instanceof ShapedRecipes) {
recipeWidth = ((ShapedRecipes) recipe).recipeWidth;
recipeHeight = ((ShapedRecipes) recipe).recipeHeight;
craftingComponents = ((ShapedRecipes) recipe).recipeItems;
} else if (recipe instanceof ShapedOreRecipe) {
recipeWidth = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, ((ShapedOreRecipe) recipe), "width");
recipeHeight = ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, ((ShapedOreRecipe) recipe), "height");
craftingComponents = ((ShapedOreRecipe) recipe).getInput();
} else if (recipe instanceof ShapelessRecipes) {
recipeWidth = ((ShapelessRecipes) recipe).getRecipeSize();
recipeHeight = -1;
craftingComponents = ((ShapelessRecipes) recipe).recipeItems.toArray();
} else if (recipe instanceof ShapelessOreRecipe) {
recipeWidth = ((ShapelessOreRecipe) recipe).getRecipeSize();
recipeHeight = -1;
craftingComponents = ((ShapelessOreRecipe) recipe).getInput().toArray();
} else {
craftingComponents = null;
}
} else {
craftingComponents = null;
}
}
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project MineFactoryReloaded by powercrystals.
the class GregTech method registerMachineUpgrades.
@Override
protected void registerMachineUpgrades() {
if (!Loader.isModLoaded("GregTech_Addon") || !Loader.isModLoaded("IC2")) {
return;
}
try {
ItemStack insulatedGoldCableItem = Items.getItem("insulatedGoldCableItem");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 0), new Object[] { "III", "PPP", "RGR", 'I', "dyeBlue", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier02" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 1), new Object[] { "III", "PPP", "RGR", 'I', Item.ingotIron, 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier02" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 2), new Object[] { "III", "PPP", "RGR", 'I', "ingotTin", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier02" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 3), new Object[] { "III", "PPP", "RGR", 'I', "ingotCopper", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier04" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 4), new Object[] { "III", "PPP", "RGR", 'I', "ingotBronze", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier04" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 5), new Object[] { "III", "PPP", "RGR", 'I', "ingotSilver", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier04" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 6), new Object[] { "III", "PPP", "RGR", 'I', "ingotGold", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier04" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 7), new Object[] { "III", "PPP", "RGR", 'I', Item.netherQuartz, 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier06" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 8), new Object[] { "III", "PPP", "RGR", 'I', "gemDiamond", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier06" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 9), new Object[] { "III", "PPP", "RGR", 'I', "ingotPlatinum", 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier06" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.upgradeItem, 1, 10), new Object[] { "III", "PPP", "RGR", 'I', Item.emerald, 'P', "dustPlastic", 'R', insulatedGoldCableItem, 'G', "craftingCircuitTier06" }));
for (int i = 0; i < 16; i++) {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MineFactoryReloadedCore.laserFocusItem, 1, i), new Object[] { "ENE", "NGN", "ENE", 'E', Item.emerald, 'N', "nuggetChrome", 'G', new ItemStack(MineFactoryReloadedCore.factoryGlassPaneBlock, 1, i) }));
}
} catch (Exception x) {
x.printStackTrace();
}
}
Aggregations