ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java

497 lines
24 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
* This file ("ItemCrafting.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* <EFBFBD> 2015 Ellpeck
*/
2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.crafting;
import cpw.mods.fml.common.registry.GameRegistry;
2015-03-08 14:58:26 +01:00
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
import ellpeck.actuallyadditions.config.ConfigValues;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
2015-03-07 12:51:28 +01:00
import ellpeck.actuallyadditions.items.InitItems;
2015-05-20 22:39:43 +02:00
import ellpeck.actuallyadditions.items.metalists.*;
2015-03-07 12:51:28 +01:00
import ellpeck.actuallyadditions.util.Util;
2015-06-21 02:28:49 +02:00
import net.minecraft.block.IGrowable;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
2015-08-29 15:40:12 +02:00
import net.minecraft.item.crafting.IRecipe;
2015-06-21 02:28:49 +02:00
import net.minecraftforge.common.IPlantable;
2015-06-30 01:58:33 +02:00
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList;
public class ItemCrafting{
2015-08-29 15:40:12 +02:00
public static IRecipe recipePhantomConnector;
public static IRecipe recipeCoil;
public static IRecipe recipeCoilAdvanced;
public static IRecipe recipeBook;
2015-08-31 10:45:05 +02:00
public static IRecipe recipeTinyCoal;
public static IRecipe recipeTinyChar;
public static ArrayList<IRecipe> recipesMashedFood = new ArrayList<IRecipe>();
public static IRecipe recipeDrill;
public static IRecipe recipeDrillSpeedI;
public static IRecipe recipeDrillSpeedII;
public static IRecipe recipeDrillSpeedIII;
public static IRecipe recipeDrillFortuneI;
public static IRecipe recipeDrillFortuneII;
public static IRecipe recipeDrillSilk;
public static IRecipe recipeDrillPlacing;
public static IRecipe recipeDrillThree;
public static IRecipe recipeDrillFive;
public static IRecipe recipeBattery;
public static IRecipe recipeBatteryDouble;
public static IRecipe recipeBatteryTriple;
public static IRecipe recipeBatteryQuadruple;
public static IRecipe recipeBatteryQuintuple;
public static IRecipe recipeStaff;
public static IRecipe recipeGrowthRing;
public static IRecipe recipeMagnetRing;
public static IRecipe recipeWaterRing;
public static IRecipe recipeWings;
public static IRecipe recipeCup;
public static IRecipe recipeKnifeHandle;
public static IRecipe recipeKnifeBlade;
public static IRecipe recipeKnife;
public static IRecipe recipeRing;
public static IRecipe recipeDough;
public static IRecipe recipeRiceDough;
public static IRecipe recipeLeafBlower;
public static IRecipe recipeLeafBlowerAdvanced;
public static ArrayList<IRecipe> recipesPotionRings = new ArrayList<IRecipe>();
2015-08-29 15:40:12 +02:00
public static void init(){
//Booklet
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper)));
recipeBook = Util.GetRecipes.lastIRecipe();
2015-05-20 22:39:43 +02:00
//Rice Stuff
if(ConfigCrafting.RICE_GADGETS.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.paper, 3),
"R ", " R ", " R",
'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())));
2015-05-20 22:39:43 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
2015-05-20 22:39:43 +02:00
'B', Items.water_bucket));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
2015-05-20 22:39:43 +02:00
'B', new ItemStack(Items.potionitem)));
}
2015-06-18 13:14:57 +02:00
//Leaf Blower
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.LEAF_BLOWER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower),
" F", "IP", "IC",
2015-03-29 15:29:05 +02:00
'F', new ItemStack(Items.flint),
'I', "ingotIron",
2015-03-29 15:29:05 +02:00
'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlower = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-06-21 02:28:49 +02:00
//Drill
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.DRILL.isEnabled()){
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrill),
"DDD", "CRC", "III",
'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
2015-06-21 02:28:49 +02:00
'R', "dustRedstone",
'I', "blockIron"));
recipeDrill = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-06-21 02:28:49 +02:00
2015-07-07 21:59:57 +02:00
//Tele Staff
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.TELE_STAFF.isEnabled()){
2015-07-07 21:59:57 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff),
2015-07-07 22:27:04 +02:00
" E", " S ", "SB ",
2015-07-07 21:59:57 +02:00
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
2015-07-07 22:27:04 +02:00
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
2015-07-08 11:49:38 +02:00
'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD)));
recipeStaff = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-07-07 21:59:57 +02:00
2015-06-21 02:28:49 +02:00
//Drill Speed
if(ConfigCrafting.DRILL_SPEED.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed),
"ISI", "SRS", "ISI",
'I', "ingotIron",
'S', Items.sugar,
'R', "dustRedstone"));
recipeDrillSpeedI = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
"ISI", "SCS", "ISI",
'I', "ingotIron",
'S', Items.sugar,
'C', Items.cake));
recipeDrillSpeedII = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
"ISI", "SFS", "ISI",
'I', "ingotIron",
'S', Items.sugar,
'F', "gemDiamond"));
recipeDrillSpeedIII = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
}
//Drill Fortune
if(ConfigCrafting.DRILL_FORTUNE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune),
"ISI", "SRS", "ISI",
'I', Blocks.glowstone,
'S', Items.redstone,
'R', Blocks.diamond_block));
recipeDrillFortuneI = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
"ISI", "SRS", "ISI",
'I', Blocks.glowstone,
'S', Items.redstone,
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
recipeDrillFortuneII = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
}
//Drill Size
if(ConfigCrafting.DRILL_SIZE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree),
"DID", "ICI", "DID",
'I', "ingotIron",
'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
recipeDrillThree = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
"DID", "ICI", "DID",
'I', "ingotIron",
'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillFive = Util.GetRecipes.lastIRecipe();
2015-06-21 02:28:49 +02:00
}
//Drill Silk Touch
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.DRILL_SILK_TOUCH.isEnabled()){
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch),
"DSD", "SCS", "DSD",
'D', "gemEmerald",
'S', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeDrillSilk = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-06-21 02:28:49 +02:00
//Drill Placing
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.DRILL_PLACING.isEnabled()){
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing),
"CEC", "RAR", "CEC",
'C', "cobblestone",
'E', Items.paper,
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
2015-06-21 02:28:49 +02:00
'R', "ingotIron"));
recipeDrillPlacing = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-06-21 02:28:49 +02:00
//Battery
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.BATTERY.isEnabled()){
2015-06-21 02:28:49 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBattery),
" R ", "ICI", "III",
'R', "dustRedstone",
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBattery = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-06-21 02:28:49 +02:00
//Double Battery
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.DOUBLE_BATTERY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryDouble),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBattery),
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryDouble = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Magnet Ring
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.MAGNET_RING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMagnetRing),
"RIB", "IOI", "BIR",
'R', "dustRedstone",
'I', "ingotIron",
'B', new ItemStack(Items.dye, 1, 4),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeMagnetRing = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Growth Ring
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.GROWTH_RING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGrowthRing),
"SIS", "IOI", "SIS",
'S', new ItemStack(Items.wheat_seeds),
'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeGrowthRing = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Water Ring
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.WATER_RING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWaterRemovalRing),
"BIB", "IOI", "BIB",
'B', new ItemStack(Items.water_bucket),
'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())));
recipeWaterRing = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Triple Battery
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.TRIPLE_BATTERY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryTriple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryDouble),
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryTriple = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Quadruple Battery
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.QUADRUPLE_BATTERY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryQuadruple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryTriple),
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuadruple = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Quintuple Battery
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.QUINTUPLE_BATTERY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBatteryQuintuple),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryQuadruple),
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeBatteryQuintuple = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Bat Wings
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.BAT_WINGS.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingsOfTheBats),
"WNW", "WDW", "WNW",
'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()),
2015-07-17 23:22:10 +02:00
'N', "blockDiamond",
'D', new ItemStack(Items.nether_star)));
recipeWings = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-07-01 18:14:21 +02:00
//Quartz
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.QUARTZ.isEnabled()){
2015-07-01 18:14:21 +02:00
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(Items.coal),
new ItemStack(Items.quartz)));
2015-08-29 15:40:12 +02:00
}
2015-07-01 18:14:21 +02:00
//Coil
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.COIL.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
" R ", "RIR", " R ",
'I', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'R', "dustRedstone"));
recipeCoil = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Cup
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.CUP.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()),
"S S", "SCS", "SSS",
'S', "stone",
'C', InitItems.itemCoffeeBean));
recipeCup = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-05-20 22:39:43 +02:00
//Resonant Rice
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.RESONANT_RICE.isEnabled() && !OreDictionary.getOres("nuggetEnderium", false).isEmpty()){
2015-05-20 22:39:43 +02:00
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemResonantRice),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.gunpowder));
2015-08-29 15:40:12 +02:00
}
2015-05-20 22:39:43 +02:00
//Advanced Coil
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.ADV_COIL.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
" G ", "GCG", " G ",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'G', "ingotGold"));
recipeCoilAdvanced = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-03-29 15:29:05 +02:00
2015-03-29 16:07:43 +02:00
//Ender Pearl
GameRegistry.addRecipe(new ItemStack(Items.ender_pearl),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.PEARL_SHARD.ordinal()));
//Emerald
GameRegistry.addRecipe(new ItemStack(Items.emerald),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.EMERALD_SHARD.ordinal()));
2015-03-29 15:29:05 +02:00
//Advanced Leaf Blower
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.LEAF_BLOWER_ADVANCED.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
" F", "DP", "DC",
2015-03-29 15:29:05 +02:00
'F', new ItemStack(Items.flint),
'D', "gemDiamond",
2015-03-29 15:29:05 +02:00
'P', new ItemStack(Blocks.piston),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafBlowerAdvanced = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-03-29 15:29:05 +02:00
2015-05-20 22:39:43 +02:00
//Phantom Connector
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.PHANTOM_CONNECTOR.isEnabled()){
2015-05-20 22:39:43 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPhantomConnector),
"YE", "EY", "S ",
'Y', Items.ender_eye,
'E', Items.ender_pearl,
'S', "stickWood"));
recipePhantomConnector = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
2015-05-20 22:39:43 +02:00
2015-03-08 14:58:26 +01:00
//Quartz
GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
2015-03-08 14:58:26 +01:00
//Knife
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.KNIFE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
2015-07-12 17:35:37 +02:00
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal())));
recipeKnife = Util.GetRecipes.lastIRecipe();
2015-08-29 15:40:12 +02:00
}
//Crafter on a Stick
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.STICK_CRAFTER.isEnabled()){
2015-06-22 18:09:00 +02:00
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrafterOnAStick),
new ItemStack(Blocks.crafting_table),
new ItemStack(Items.sign)));
2015-08-29 15:40:12 +02:00
}
2015-05-20 22:39:43 +02:00
//Tiny Coal
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()),
new ItemStack(Items.coal));
recipeTinyCoal = Util.GetRecipes.lastIRecipe();
2015-05-20 22:39:43 +02:00
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()),
new ItemStack(Items.coal, 1, 1));
recipeTinyChar = Util.GetRecipes.lastIRecipe();
2015-05-20 22:39:43 +02:00
//Rice Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//Canola Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
2015-03-31 20:37:55 +02:00
//Rings
initPotionRingRecipes();
2015-03-08 14:58:26 +01:00
//Ingots from Dusts
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()),
2015-03-07 12:51:28 +01:00
new ItemStack(Items.iron_ingot), 1F);
2015-03-08 14:58:26 +01:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()),
2015-03-07 12:51:28 +01:00
new ItemStack(Items.gold_ingot), 1F);
2015-03-08 14:58:26 +01:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.DIAMOND.ordinal()),
2015-03-07 12:51:28 +01:00
new ItemStack(Items.diamond), 1F);
2015-03-08 14:58:26 +01:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.EMERALD.ordinal()),
2015-03-07 12:51:28 +01:00
new ItemStack(Items.emerald), 1F);
2015-03-08 14:58:26 +01:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.LAPIS.ordinal()),
2015-03-07 12:51:28 +01:00
new ItemStack(Items.dye, 1, 4), 1F);
2015-03-08 14:58:26 +01:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ_BLACK.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ.ordinal()),
new ItemStack(Items.quartz), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()),
new ItemStack(Items.coal), 1F);
2015-03-07 12:51:28 +01:00
}
2015-03-31 20:37:55 +02:00
public static void initPotionRingRecipes(){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()),
2015-03-31 20:37:55 +02:00
"IGI", "GDG", "IGI",
'G', "ingotGold",
'I', "ingotIron",
'D', "dustGlowstone"));
recipeRing = Util.GetRecipes.lastIRecipe();
2015-03-31 20:37:55 +02:00
2015-08-29 15:40:12 +02:00
if(ConfigCrafting.RING_SPEED.isEnabled()){
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
}
if(ConfigCrafting.RING_HASTE.isEnabled()){
addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal());
}
if(ConfigCrafting.RING_STRENGTH.isEnabled()){
addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal());
}
if(ConfigCrafting.RING_JUMP_BOOST.isEnabled()){
addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal());
}
if(ConfigCrafting.RING_REGEN.isEnabled()){
addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal());
}
if(ConfigCrafting.RING_RESISTANCE.isEnabled()){
addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal());
}
if(ConfigCrafting.RING_FIRE_RESISTANCE.isEnabled()){
addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal());
}
if(ConfigCrafting.RING_WATER_BREATHING.isEnabled()){
addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal());
}
if(ConfigCrafting.RING_INVISIBILITY.isEnabled()){
addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal());
}
if(ConfigCrafting.RING_NIGHT_VISION.isEnabled()){
addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal());
}
}
public static void addRingRecipeWithStack(ItemStack mainStack, int meta){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(Blocks.diamond_block), new ItemStack(Items.nether_wart), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipesPotionRings.add(Util.GetRecipes.lastIRecipe());
2015-05-20 22:39:43 +02:00
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(Items.nether_star), new ItemStack(Items.nether_star));
recipesPotionRings.add(Util.GetRecipes.lastIRecipe());
2015-03-31 20:37:55 +02:00
}
public static void initMashedFoodRecipes(){
2015-06-21 02:28:49 +02:00
if(ConfigCrafting.MASHED_FOOD.isEnabled()){
2015-07-13 03:50:12 +02:00
for(Object item : Item.itemRegistry){
if(item instanceof ItemFood || item instanceof IPlantable || item instanceof IGrowable){
if(!isBlacklisted(item)){
ItemStack ingredient = new ItemStack((Item)item, 1, Util.WILDCARD);
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
recipesMashedFood.add(Util.GetRecipes.lastIRecipe());
}
2015-06-21 02:28:49 +02:00
}
}
}
}
2015-07-13 03:50:12 +02:00
private static boolean isBlacklisted(Object item){
for(String except : ConfigValues.mashedFoodCraftingExceptions){
2015-10-03 10:16:18 +02:00
if(Item.itemRegistry.getNameForObject(item).equals(except)){
return true;
}
2015-07-13 03:50:12 +02:00
}
return false;
}
}