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

360 lines
18 KiB
Java
Raw Normal View History

2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.crafting;
import cpw.mods.fml.common.registry.GameRegistry;
import ellpeck.actuallyadditions.blocks.BlockColoredLamp;
2015-03-07 12:51:28 +01:00
import ellpeck.actuallyadditions.blocks.InitBlocks;
2015-03-30 15:08:19 +02:00
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
2015-05-20 22:39:43 +02:00
import ellpeck.actuallyadditions.items.InitItems;
2015-03-07 12:51:28 +01:00
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
2015-06-12 21:29:21 +02:00
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public class BlockCrafting{
public static void init(){
//Compost
if(ConfigCrafting.COMPOST.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCompost),
"W W", "W W", "WCW",
'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())));
2015-05-20 22:39:43 +02:00
//Charcoal Block
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()),
"CCC", "CCC", "CCC",
'C', new ItemStack(Items.coal, 1, 1));
GameRegistry.addShapelessRecipe(new ItemStack(Items.coal, 9, 1),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
//Wood Casing
if(ConfigCrafting.WOOD_CASING.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
"WSW", "SRS", "WSW",
'W', "plankWood",
2015-07-01 18:14:21 +02:00
'R', "logWood",
'S', "stickWood"));
//Ender Casing
if(ConfigCrafting.ENDER_CASING.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
"WSW", "SRS", "WSW",
'W', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
'S', Blocks.obsidian));
//Phantom Booster
if(ConfigCrafting.PHANTOM_BOOSTER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomBooster),
"RDR", "DCD", "RDR",
'R', "dustRedstone",
'D', "gemDiamond",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
//Coffee Machine
if(ConfigCrafting.COFFEE_MACHINE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoffeeMachine),
" C ", " S ", "A A",
'C', InitItems.itemCoffeeBean,
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
2015-06-21 02:28:49 +02:00
//Energizer
if(ConfigCrafting.ENERGIZER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnergizer),
"I I", "CAC", "I I",
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
2015-06-21 02:28:49 +02:00
//Energizer
if(ConfigCrafting.ENERVATOR.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnervator),
" I ", "CAC", " I ",
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
2015-06-21 02:28:49 +02:00
//Lava Factory
if(ConfigCrafting.LAVA_FACTORY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLavaFactoryController),
" C ", "ISI", " L ",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', "blockIron",
'L', Items.lava_bucket));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 4, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()),
"ICI",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'I', "blockIron"));
}
2015-05-20 22:39:43 +02:00
//Canola Press
if(ConfigCrafting.CANOLA_PRESS.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCanolaPress),
"CHC", "CDC", "CRC",
'C', "cobblestone",
'H', Blocks.hopper,
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
2015-05-20 22:39:43 +02:00
//Fermenting Barrel
if(ConfigCrafting.FERMENTING_BARREL.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
"CHC", "CDC", "CRC",
'C', "logWood",
'H', Blocks.hopper,
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
2015-05-20 22:39:43 +02:00
//Phantomface
if(ConfigCrafting.PHANTOMFACE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomface),
2015-05-30 17:47:57 +02:00
" C ", "EBE", " S ",
2015-05-20 22:39:43 +02:00
'E', Items.ender_eye,
'C', Blocks.chest,
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
2015-05-20 22:39:43 +02:00
2015-05-30 17:47:57 +02:00
//Phantom Placer
if(ConfigCrafting.PHANTOM_PLACER.isEnabled())
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomPlacer),
InitBlocks.blockPlacer,
InitBlocks.blockPhantomface));
2015-05-30 17:47:57 +02:00
//Phantom Breaker
if(ConfigCrafting.PHANTOM_BREAKER.isEnabled())
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomBreaker),
InitBlocks.blockBreaker,
InitBlocks.blockPhantomface));
2015-05-30 17:47:57 +02:00
//Phantom Energyface
if(ConfigCrafting.PHANTOM_ENERGYFACE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface),
" R ", "RFR", " R ",
'R', "dustRedstone",
'F', InitBlocks.blockPhantomface));
2015-05-30 17:47:57 +02:00
//Phantom Liquiface
if(ConfigCrafting.PHANTOM_LIQUIFACE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface),
"RFR",
'R', Items.bucket,
'F', InitBlocks.blockPhantomface));
2015-05-30 17:47:57 +02:00
//Liquid Placer
if(ConfigCrafting.LIQUID_PLACER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer),
"RFR",
'R', Items.bucket,
'F', InitBlocks.blockPlacer));
2015-05-30 17:47:57 +02:00
//Liquid Breaker
if(ConfigCrafting.LIQUID_BREAKER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidCollector),
"RFR",
'R', Items.bucket,
'F', InitBlocks.blockBreaker));
2015-05-30 17:47:57 +02:00
2015-05-20 22:39:43 +02:00
//Oil Generator
if(ConfigCrafting.OIL_GENERATOR.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockOilGenerator),
"CRC", "CBC", "CRC",
'C', "cobblestone",
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())));
2015-05-20 22:39:43 +02:00
//Coal Generator
if(ConfigCrafting.COAL_GENERATOR.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoalGenerator),
"CRC", "CBC", "CRC",
'C', "cobblestone",
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
2015-06-12 21:29:21 +02:00
'B', new ItemStack(Items.coal, 1, Util.WILDCARD)));
2015-05-20 22:39:43 +02:00
//Enderpearl Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
"EE", "EE",
'E', Items.ender_pearl));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ender_pearl, 4),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
2015-05-20 22:39:43 +02:00
//Stone Casing
if(ConfigCrafting.STONE_CASING.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
"WSW", "SRS", "WSW",
'W', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'S', "stickWood"));
2015-03-30 15:08:19 +02:00
//Quartz Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
2015-03-30 15:08:19 +02:00
"QQ", "QQ",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
2015-03-30 15:08:19 +02:00
//Fishing Net
if(ConfigCrafting.FISHING_NET.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet),
2015-03-31 20:37:55 +02:00
"SSS", "SDS", "SSS",
'D', "gemDiamond",
'S', Items.string));
2015-03-31 20:37:55 +02:00
2015-04-02 12:06:42 +02:00
//Repairer
if(ConfigCrafting.REPAIRER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer),
"DID", "OCO", "DID",
'D', "gemDiamond",
'I', "ingotIron",
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())));
2015-04-02 12:06:42 +02:00
2015-03-31 20:37:55 +02:00
//Solar Panel
2015-05-20 22:39:43 +02:00
if(ConfigCrafting.SOLAR_PANEL.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
"IQI", "CDC", "IBI",
'D', "blockDiamond",
'I', "ingotIron",
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
2015-05-20 22:39:43 +02:00
'B', new ItemStack(Blocks.iron_bars)));
2015-03-31 20:37:55 +02:00
//Heat Collector
2015-05-20 22:39:43 +02:00
if(ConfigCrafting.HEAT_COLLECTOR.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector),
"BRB", "CDC", "BQB",
2015-05-20 22:39:43 +02:00
'D', "gemDiamond",
2015-03-31 20:37:55 +02:00
'R', new ItemStack(Items.repeater),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
2015-03-31 20:37:55 +02:00
'L', new ItemStack(Items.lava_bucket),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
2015-05-20 22:39:43 +02:00
'B', new ItemStack(Blocks.iron_bars)));
2015-03-30 15:08:19 +02:00
//Quartz Pillar
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()),
2015-03-30 15:08:19 +02:00
"Q", "Q",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
2015-03-30 15:08:19 +02:00
//Chiseled Quartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()),
2015-03-30 15:08:19 +02:00
"Q", "Q",
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
2015-03-30 15:08:19 +02:00
2015-03-21 16:11:22 +01:00
//Inputter
if(ConfigCrafting.INPUTTER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockInputter),
"WWW", "CHC", "WWW",
'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'H', new ItemStack(Blocks.hopper)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
InitBlocks.blockInputter,
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
"dustRedstone"));
}
2015-03-21 16:11:22 +01:00
//Crusher
if(ConfigCrafting.CRUSHER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder),
"CFC", "DQD", "CFC",
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', new ItemStack(Blocks.piston),
'F', new ItemStack(Items.flint)));
//Double Crusher
if(ConfigCrafting.DOUBLE_CRUSHER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
"CDC", "RFR", "CDC",
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', InitBlocks.blockGrinder,
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', new ItemStack(Blocks.piston)));
//Double Furnace
if(ConfigCrafting.COMPOST.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
"CDC", "RFR", "CDC",
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(Blocks.furnace),
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'P', "ingotBrick"));
//Feeder
if(ConfigCrafting.DOUBLE_FURNACE.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFeeder),
"WCW", "DHD", "WCW",
'W', "plankWood",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(Items.golden_carrot),
'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())));
//Giant Chest
if(ConfigCrafting.GIANT_CHEST.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGiantChest),
"CWC", "WDW", "CWC",
'C', new ItemStack(Blocks.chest),
'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'W', "plankWood"));
//Greenhouse Glass
if(ConfigCrafting.GREENHOUSE_GLASS.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass),
"GSG", "SDS", "GSG",
'G', "blockGlass",
'D', Blocks.obsidian,
'S', "treeSapling"));
//Placer
if(ConfigCrafting.PLACER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlacer),
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', Blocks.piston));
//Breaker
if(ConfigCrafting.BREAKER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBreaker),
"CCC", "CRP", "CCC",
'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
2015-05-30 17:47:57 +02:00
'P', Items.iron_pickaxe));
2015-05-04 17:26:50 +02:00
//Dropper
if(ConfigCrafting.DROPPER.isEnabled())
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDropper),
"CCC", "CDR", "CCC",
'C', "cobblestone",
'D', Blocks.dropper,
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
2015-05-04 17:26:50 +02:00
if(ConfigCrafting.LAMPS.isEnabled()){
for(int i = 0; i < BlockColoredLamp.allLampTypes.length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i),
"GGG", "DQD", "GGG",
'G', "glowstone",
'D', "dye"+BlockColoredLamp.allLampTypes[i].name,
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
}
2015-07-07 15:31:10 +02:00
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
"XXX", "XLX", "XXX",
'X', "dustRedstone",
'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD)));
}
}
}