Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package alphaitems.lib;
- import java.util.Random;
- import net.minecraft.block.Block;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.nbt.NBTTagCompound;
- import alphaitems.blocks.Blocks;
- import alphaitems.items.Items;
- import cpw.mods.fml.common.event.FMLInterModComms;
- import cpw.mods.fml.common.registry.GameRegistry;
- public class Recipes {
- public static void init() {
- /*
- * Crafting
- */
- // SPC Block (to super coal item)
- GameRegistry.addShapelessRecipe(new ItemStack(Items.spcItem, 9),
- new Object[] {
- Blocks.spcBlock
- });
- // SPC Item (to super coal block)
- GameRegistry.addRecipe(new ItemStack(Blocks.spcBlock, 1), new Object[] {
- "CCC", "CCC", "CCC", 'C', Items.spcItem
- });
- // Fueltonium Block (to fuelonite)
- GameRegistry.addShapelessRecipe(new ItemStack(Items.fuelIngot, 9),
- new Object[] {
- Blocks.fuelBlockID
- });
- // Fuelonite Item (to fueltonium block)
- GameRegistry.addRecipe(new ItemStack(Blocks.fuelBlockID, 1),
- new Object[] {
- "CCC", "CCC", "CCC", 'C', Items.fuelIngot
- });
- GameRegistry.addShapelessRecipe(new ItemStack(Blocks.blackMarbleBlock,
- 1), new Object[] {
- Blocks.marbleBlock, new ItemStack(Item.dyePowder, 1, 0)
- });
- // //Colored Bricks
- // // (Ingots)
- // Blue
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBlue, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 4) // 4
- });
- // Red
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbRed, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 1) // 1
- });
- // Green
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbGreen, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 2) // 2
- });
- // Purple
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbPurple, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 5) // 5
- });
- // Cyan
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbCyan, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 6) // 6
- });
- // Pink
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbPink, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 9) // 9
- });
- // Yellow
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbYellow, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 11) // 11
- });
- // Black
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBlack, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 0)
- });
- // White
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbWhite, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 15)
- });
- // Lime
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLime, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 10)
- });
- // Brown
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBrown, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 3)
- });
- // Magenta
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbMagenta, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 13)
- });
- // Light Blue
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLightBlue, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 12)
- });
- // Light Gray
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLightGray, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 7)
- });
- // Orange
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbOrange, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 14)
- });
- // Gray
- GameRegistry.addShapelessRecipe(new ItemStack(Items.cbGray, 1),
- new Object[] {
- Item.brick, new ItemStack(Item.dyePowder, 1, 8)
- });
- GameRegistry.addRecipe(new ItemStack(Blocks.shineTorch, 4),
- new Object[] {
- "G ", "S ", 'G', Items.shineDust, 'S',
- Item.stick
- });
- GameRegistry.addRecipe(new ItemStack(Blocks.shineTorch, 4),
- new Object[] {
- " G ", " S ", 'G', Items.shineDust, 'S',
- Item.stick
- });
- GameRegistry.addRecipe(new ItemStack(Block.torchWood, 8),
- new Object[] {
- "G ", "S ", 'G', Items.spcItem, 'S',
- Item.stick
- });
- GameRegistry.addRecipe(new ItemStack(Block.torchWood, 8),
- new Object[] {
- " G ", " S ", 'G', Items.spcItem, 'S',
- Item.stick
- });
- /*
- * Sticks
- */
- // White
- GameRegistry.addRecipe(new ItemStack(Items.marbleStick, 4),
- new Object[] {
- "G ", "G ", 'G', Blocks.marbleBlock
- });
- GameRegistry.addRecipe(new ItemStack(Items.marbleStick, 4),
- new Object[] {
- " G ", " G ", 'G', Blocks.marbleBlock
- });
- // Black
- GameRegistry.addRecipe(new ItemStack(Items.blackMarbleStick, 4),
- new Object[] {
- "G ", "G ", 'G', Blocks.blackMarbleBlock
- });
- GameRegistry.addRecipe(new ItemStack(Items.blackMarbleStick, 4),
- new Object[] {
- " G ", " G ", 'G', Blocks.blackMarbleBlock
- });
- /*
- * Railings
- */
- // White
- GameRegistry.addRecipe(new ItemStack(Blocks.marbleRailing, 3),
- new Object[] {
- "SSS", "SSS", " ", 'S', Items.marbleStick
- });
- GameRegistry.addRecipe(new ItemStack(Blocks.marbleRailing, 3),
- new Object[] {
- " ", "SSS", "SSS", 'S', Items.marbleStick
- });
- // Black
- GameRegistry.addRecipe(new ItemStack(Blocks.blackMarbleRailing, 3),
- new Object[] {
- "SSS", "SSS", " ", 'S', Items.blackMarbleStick
- });
- GameRegistry.addRecipe(new ItemStack(Blocks.blackMarbleRailing, 3),
- new Object[] {
- " ", "SSS", "SSS", 'S', Items.blackMarbleStick
- });
- addBricks(Items.cbBlue, Blocks.cbBlue);
- addBricks(Items.cbRed, Blocks.cbRed);
- addBricks(Items.cbGreen, Blocks.cbGreen);
- addBricks(Items.cbPurple, Blocks.cbPurple);
- addBricks(Items.cbCyan, Blocks.cbCyan);
- addBricks(Items.cbPink, Blocks.cbPink);
- addBricks(Items.cbYellow, Blocks.cbYellow);
- addBricks(Items.cbWhite, Blocks.cbWhite);
- addBricks(Items.cbBlack, Blocks.cbBlack);
- addBricks(Items.cbOrange, Blocks.cbOrange);
- addBricks(Items.cbBrown, Blocks.cbBrown);
- addBricks(Items.cbMagenta, Blocks.cbMagenta);
- addBricks(Items.cbLightBlue, Blocks.cbLightBlue);
- addBricks(Items.cbGray, Blocks.cbGray);
- addBricks(Items.cbLightGray, Blocks.cbLightGray);
- addBricks(Items.cbLime, Blocks.cbLime);
- addBricks(Items.swampClayBall, Blocks.swampClay);
- addStairs(Blocks.cbBlue, Blocks.cbBlueStairs);
- addStairs(Blocks.cbRed, Blocks.cbRedStairs);
- addStairs(Blocks.cbGreen, Blocks.cbGreenStairs);
- addStairs(Blocks.cbPurple, Blocks.cbPurpleStairs);
- addStairs(Blocks.cbCyan, Blocks.cbCyanStairs);
- addStairs(Blocks.cbPink, Blocks.cbPinkStairs);
- addStairs(Blocks.cbYellow, Blocks.cbYellowStairs);
- addStairs(Blocks.cbWhite, Blocks.cbWhiteStairs);
- addStairs(Blocks.cbBlack, Blocks.cbBlackStairs);
- addStairs(Blocks.cbOrange, Blocks.cbOrangeStairs);
- addStairs(Blocks.cbBrown, Blocks.cbBrownStairs);
- addStairs(Blocks.cbMagenta, Blocks.cbMagentaStairs);
- addStairs(Blocks.cbLightBlue, Blocks.cbLightBlueStairs);
- addStairs(Blocks.cbGray, Blocks.cbGrayStairs);
- addStairs(Blocks.cbLightGray, Blocks.cbLightGrayStairs);
- addStairs(Blocks.cbLime, Blocks.cbLimeStairs);
- addStairs(Blocks.marbleBlock, Blocks.marbleStairs);
- addStairs(Blocks.blackMarbleBlock, Blocks.blackMarbleStairs);
- // Not bricks
- addBricks(Items.shineDust, Blocks.shineStone);
- /*
- * Smelting
- */
- int input = Blocks.spcOre.blockID;
- ItemStack output = new ItemStack(Items.spcItem, 2);
- float xp = 5F;
- GameRegistry.addSmelting(input, output, xp);
- int input2 = Blocks.spcNetherOre.blockID;
- ItemStack output2 = new ItemStack(Blocks.spcOre, 2);
- float xp2 = 10F;
- GameRegistry.addSmelting(input2, output2, xp2);
- int input3 = Item.rottenFlesh.itemID;
- ItemStack output3 = new ItemStack(Item.leather, 1);
- float xp3 = 2F;
- GameRegistry.addSmelting(input3, output3, xp3);
- int input4 = Block.gravel.blockID;
- ItemStack output4 = new ItemStack(Blocks.betterGlass, 1);
- float xp4 = 2F;
- GameRegistry.addSmelting(input4, output4, xp4);
- int input5 = Blocks.fnOre.blockID;
- ItemStack output5 = new ItemStack(Items.fuelonite, 2);
- float xp5 = 10F;
- GameRegistry.addSmelting(input5, output5, xp5);
- int input6 = Items.fuelonite.itemID;
- ItemStack output6 = new ItemStack(Items.fuelIngot, 2);
- float xp6 = 20F;
- GameRegistry.addSmelting(input6, output6, xp6);
- int input7 = Item.egg.itemID;
- int randInt = (new Random()).nextInt(2);
- int numberOfEggs = (randInt > 0) ? randInt : 1;
- ItemStack output7 = new ItemStack(Items.friedEgg, numberOfEggs);
- float xp7 = 5F;
- GameRegistry.addSmelting(input7, output7, xp7);
- int input8 = Items.swampClayBall.itemID;
- ItemStack output8 = new ItemStack(Item.brick, 1);
- float xp8 = 5F;
- GameRegistry.addSmelting(input8, output8, xp8);
- int input9 = Blocks.swampClay.blockID;
- ItemStack output9 = new ItemStack(Block.brick, 1);
- float xp9 = 8F;
- GameRegistry.addSmelting(input9, output9, xp9);
- // ========[PULVERIZERDATA]========
- // Regular SPC Ore
- NBTTagCompound spcSend = new NBTTagCompound();
- spcSend.setInteger("energy", 50);
- spcSend.setCompoundTag("input", new NBTTagCompound());
- spcSend.setCompoundTag("output", new NBTTagCompound());
- spcSend.setCompoundTag("secondaryOutput", new NBTTagCompound());
- (new ItemStack(Blocks.spcOre, 1)).writeToNBT(spcSend
- .getCompoundTag("input"));
- (new ItemStack(Items.spcItem, 2)).writeToNBT(spcSend
- .getCompoundTag("output"));
- (new ItemStack(Item.coal, 1)).writeToNBT(spcSend
- .getCompoundTag("secondaryOutput"));
- spcSend.setInteger("secondaryChance", 15);
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- spcSend);
- // Nether SPC Ore
- NBTTagCompound spcnSend = new NBTTagCompound();
- spcnSend.setInteger("energy", 75);
- spcnSend.setCompoundTag("input", new NBTTagCompound());
- spcnSend.setCompoundTag("output", new NBTTagCompound());
- spcnSend.setCompoundTag("secondaryOutput", new NBTTagCompound());
- (new ItemStack(Blocks.spcNetherOre, 1)).writeToNBT(spcnSend
- .getCompoundTag("input"));
- (new ItemStack(Items.spcItem, 4)).writeToNBT(spcnSend
- .getCompoundTag("output"));
- (new ItemStack(Item.coal, 2)).writeToNBT(spcnSend
- .getCompoundTag("secondaryOutput"));
- spcnSend.setInteger("secondaryChance", 20);
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- spcnSend);
- // Ender SPC Ore
- NBTTagCompound spceSend = new NBTTagCompound();
- spceSend.setInteger("energy", 90);
- spceSend.setCompoundTag("input", new NBTTagCompound());
- spceSend.setCompoundTag("output", new NBTTagCompound());
- (new ItemStack(Blocks.enderSpcOre, 1)).writeToNBT(spceSend
- .getCompoundTag("input"));
- (new ItemStack(Items.spcItem, 6)).writeToNBT(spceSend
- .getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- spceSend);
- // Regular FN Ore
- NBTTagCompound fSend = new NBTTagCompound();
- fSend.setInteger("energy", 60);
- fSend.setCompoundTag("input", new NBTTagCompound());
- fSend.setCompoundTag("output", new NBTTagCompound());
- (new ItemStack(Blocks.fueltonium, 1)).writeToNBT(fSend
- .getCompoundTag("input"));
- (new ItemStack(Items.fuelonite, 2)).writeToNBT(fSend
- .getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- fSend);
- // Nether FN Ore
- NBTTagCompound fnSend = new NBTTagCompound();
- fnSend.setInteger("energy", 80);
- fnSend.setCompoundTag("input", new NBTTagCompound());
- fnSend.setCompoundTag("output", new NBTTagCompound());
- (new ItemStack(Blocks.fnOre, 1)).writeToNBT(fnSend
- .getCompoundTag("input"));
- (new ItemStack(Items.fuelonite, 4)).writeToNBT(fnSend
- .getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- fnSend);
- // Ender FN Ore
- NBTTagCompound feSend = new NBTTagCompound();
- feSend.setInteger("energy", 100);
- feSend.setCompoundTag("input", new NBTTagCompound());
- feSend.setCompoundTag("output", new NBTTagCompound());
- (new ItemStack(Blocks.enderFnOre, 1)).writeToNBT(feSend
- .getCompoundTag("input"));
- (new ItemStack(Items.fuelonite, 6)).writeToNBT(feSend
- .getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- feSend);
- // Fueltonium Ingot
- NBTTagCompound fiSend = new NBTTagCompound();
- fiSend.setInteger("energy", 25);
- fiSend.setCompoundTag("input", new NBTTagCompound());
- fiSend.setCompoundTag("output", new NBTTagCompound());
- (new ItemStack(Items.fuelIngot, 1)).writeToNBT(fiSend
- .getCompoundTag("input"));
- (new ItemStack(Items.fuelonite, 1)).writeToNBT(fiSend
- .getCompoundTag("output"));
- FMLInterModComms.sendMessage("ThermalExpansion",
- "PulverizerRecipe",
- fiSend);
- // ========[/PULVERIZERDATA]========
- }
- public static void addBricks(Item coloredBrick, Block coloredBlock) {
- GameRegistry.addRecipe(new ItemStack(coloredBlock, 1), new Object[] {
- "CC ", "CC ", " ", 'C', coloredBrick
- });
- GameRegistry.addShapelessRecipe(new ItemStack(coloredBrick, 4),
- new Object[] {
- coloredBlock
- });
- }
- public static void addStairs(Block buildingBlock, Block stairBlock) {
- GameRegistry.addRecipe(new ItemStack(stairBlock, 3), new Object[] {
- " C", " CC", "CCC", 'C', buildingBlock
- });
- GameRegistry.addRecipe(new ItemStack(stairBlock, 3), new Object[] {
- "C ", "CC ", "CCC", 'C', buildingBlock
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment