Guest User

Recipes

a guest
Jul 1st, 2014
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 13.81 KB | None | 0 0
  1. package alphaitems.lib;
  2.  
  3. import java.util.Random;
  4.  
  5. import net.minecraft.block.Block;
  6. import net.minecraft.item.Item;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraft.nbt.NBTTagCompound;
  9. import alphaitems.blocks.Blocks;
  10. import alphaitems.items.Items;
  11. import cpw.mods.fml.common.event.FMLInterModComms;
  12. import cpw.mods.fml.common.registry.GameRegistry;
  13.  
  14. public class Recipes {
  15.     public static void init() {
  16.        
  17.         /*
  18.          * Crafting
  19.          */
  20.        
  21.         // SPC Block (to super coal item)
  22.         GameRegistry.addShapelessRecipe(new ItemStack(Items.spcItem, 9),
  23.                 new Object[] {
  24.                 Blocks.spcBlock
  25.                 });
  26.        
  27.         // SPC Item (to super coal block)
  28.         GameRegistry.addRecipe(new ItemStack(Blocks.spcBlock, 1), new Object[] {
  29.                 "CCC", "CCC", "CCC", 'C', Items.spcItem
  30.         });
  31.        
  32.         // Fueltonium Block (to fuelonite)
  33.         GameRegistry.addShapelessRecipe(new ItemStack(Items.fuelIngot, 9),
  34.                 new Object[] {
  35.                 Blocks.fuelBlockID
  36.                 });
  37.        
  38.         // Fuelonite Item (to fueltonium block)
  39.         GameRegistry.addRecipe(new ItemStack(Blocks.fuelBlockID, 1),
  40.                 new Object[] {
  41.                         "CCC", "CCC", "CCC", 'C', Items.fuelIngot
  42.                 });
  43.        
  44.         GameRegistry.addShapelessRecipe(new ItemStack(Blocks.blackMarbleBlock,
  45.                 1), new Object[] {
  46.                 Blocks.marbleBlock, new ItemStack(Item.dyePowder, 1, 0)
  47.         });
  48.        
  49.         // //Colored Bricks
  50.         // // (Ingots)
  51.         // Blue
  52.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBlue, 1),
  53.                 new Object[] {
  54.                         Item.brick, new ItemStack(Item.dyePowder, 1, 4) // 4
  55.                 });
  56.         // Red
  57.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbRed, 1),
  58.                 new Object[] {
  59.                         Item.brick, new ItemStack(Item.dyePowder, 1, 1) // 1
  60.                 });
  61.         // Green
  62.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbGreen, 1),
  63.                 new Object[] {
  64.                         Item.brick, new ItemStack(Item.dyePowder, 1, 2) // 2
  65.                 });
  66.         // Purple
  67.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbPurple, 1),
  68.                 new Object[] {
  69.                         Item.brick, new ItemStack(Item.dyePowder, 1, 5) // 5
  70.                 });
  71.         // Cyan
  72.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbCyan, 1),
  73.                 new Object[] {
  74.                         Item.brick, new ItemStack(Item.dyePowder, 1, 6) // 6
  75.                 });
  76.         // Pink
  77.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbPink, 1),
  78.                 new Object[] {
  79.                         Item.brick, new ItemStack(Item.dyePowder, 1, 9) // 9
  80.                 });
  81.         // Yellow
  82.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbYellow, 1),
  83.                 new Object[] {
  84.                         Item.brick, new ItemStack(Item.dyePowder, 1, 11) // 11
  85.                 });
  86.         // Black
  87.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBlack, 1),
  88.                 new Object[] {
  89.                         Item.brick, new ItemStack(Item.dyePowder, 1, 0)
  90.                 });
  91.         // White
  92.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbWhite, 1),
  93.                 new Object[] {
  94.                         Item.brick, new ItemStack(Item.dyePowder, 1, 15)
  95.                 });
  96.         // Lime
  97.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLime, 1),
  98.                 new Object[] {
  99.                         Item.brick, new ItemStack(Item.dyePowder, 1, 10)
  100.                 });
  101.         // Brown
  102.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbBrown, 1),
  103.                 new Object[] {
  104.                         Item.brick, new ItemStack(Item.dyePowder, 1, 3)
  105.                 });
  106.         // Magenta
  107.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbMagenta, 1),
  108.                 new Object[] {
  109.                         Item.brick, new ItemStack(Item.dyePowder, 1, 13)
  110.                 });
  111.         // Light Blue
  112.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLightBlue, 1),
  113.                 new Object[] {
  114.                         Item.brick, new ItemStack(Item.dyePowder, 1, 12)
  115.                 });
  116.         // Light Gray
  117.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbLightGray, 1),
  118.                 new Object[] {
  119.                         Item.brick, new ItemStack(Item.dyePowder, 1, 7)
  120.                 });
  121.         // Orange
  122.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbOrange, 1),
  123.                 new Object[] {
  124.                         Item.brick, new ItemStack(Item.dyePowder, 1, 14)
  125.                 });
  126.         // Gray
  127.         GameRegistry.addShapelessRecipe(new ItemStack(Items.cbGray, 1),
  128.                 new Object[] {
  129.                         Item.brick, new ItemStack(Item.dyePowder, 1, 8)
  130.                 });
  131.        
  132.         GameRegistry.addRecipe(new ItemStack(Blocks.shineTorch, 4),
  133.                 new Object[] {
  134.                         "G  ", "S  ", 'G', Items.shineDust, 'S',
  135.                         Item.stick
  136.                 });
  137.         GameRegistry.addRecipe(new ItemStack(Blocks.shineTorch, 4),
  138.                 new Object[] {
  139.                         " G ", " S ", 'G', Items.shineDust, 'S',
  140.                         Item.stick
  141.                 });
  142.        
  143.         GameRegistry.addRecipe(new ItemStack(Block.torchWood, 8),
  144.                 new Object[] {
  145.                         "G  ", "S  ", 'G', Items.spcItem, 'S',
  146.                         Item.stick
  147.                 });
  148.         GameRegistry.addRecipe(new ItemStack(Block.torchWood, 8),
  149.                 new Object[] {
  150.                         " G ", " S ", 'G', Items.spcItem, 'S',
  151.                         Item.stick
  152.                 });
  153.        
  154.         /*
  155.          * Sticks
  156.          */
  157.        
  158.         // White
  159.         GameRegistry.addRecipe(new ItemStack(Items.marbleStick, 4),
  160.                 new Object[] {
  161.                         "G  ", "G  ", 'G', Blocks.marbleBlock
  162.                 });
  163.         GameRegistry.addRecipe(new ItemStack(Items.marbleStick, 4),
  164.                 new Object[] {
  165.                         " G ", " G ", 'G', Blocks.marbleBlock
  166.                 });
  167.        
  168.         // Black
  169.         GameRegistry.addRecipe(new ItemStack(Items.blackMarbleStick, 4),
  170.                 new Object[] {
  171.                         "G  ", "G  ", 'G', Blocks.blackMarbleBlock
  172.                 });
  173.         GameRegistry.addRecipe(new ItemStack(Items.blackMarbleStick, 4),
  174.                 new Object[] {
  175.                         " G ", " G ", 'G', Blocks.blackMarbleBlock
  176.                 });
  177.        
  178.         /*
  179.          * Railings
  180.          */
  181.        
  182.         // White
  183.         GameRegistry.addRecipe(new ItemStack(Blocks.marbleRailing, 3),
  184.                 new Object[] {
  185.                         "SSS", "SSS", "   ", 'S', Items.marbleStick
  186.                 });
  187.         GameRegistry.addRecipe(new ItemStack(Blocks.marbleRailing, 3),
  188.                 new Object[] {
  189.                         "   ", "SSS", "SSS", 'S', Items.marbleStick
  190.                 });
  191.        
  192.         // Black
  193.         GameRegistry.addRecipe(new ItemStack(Blocks.blackMarbleRailing, 3),
  194.                 new Object[] {
  195.                         "SSS", "SSS", "   ", 'S', Items.blackMarbleStick
  196.                 });
  197.         GameRegistry.addRecipe(new ItemStack(Blocks.blackMarbleRailing, 3),
  198.                 new Object[] {
  199.                         "   ", "SSS", "SSS", 'S', Items.blackMarbleStick
  200.                 });
  201.        
  202.         addBricks(Items.cbBlue, Blocks.cbBlue);
  203.         addBricks(Items.cbRed, Blocks.cbRed);
  204.         addBricks(Items.cbGreen, Blocks.cbGreen);
  205.         addBricks(Items.cbPurple, Blocks.cbPurple);
  206.         addBricks(Items.cbCyan, Blocks.cbCyan);
  207.         addBricks(Items.cbPink, Blocks.cbPink);
  208.         addBricks(Items.cbYellow, Blocks.cbYellow);
  209.         addBricks(Items.cbWhite, Blocks.cbWhite);
  210.         addBricks(Items.cbBlack, Blocks.cbBlack);
  211.         addBricks(Items.cbOrange, Blocks.cbOrange);
  212.         addBricks(Items.cbBrown, Blocks.cbBrown);
  213.         addBricks(Items.cbMagenta, Blocks.cbMagenta);
  214.         addBricks(Items.cbLightBlue, Blocks.cbLightBlue);
  215.         addBricks(Items.cbGray, Blocks.cbGray);
  216.         addBricks(Items.cbLightGray, Blocks.cbLightGray);
  217.         addBricks(Items.cbLime, Blocks.cbLime);
  218.        
  219.         addBricks(Items.swampClayBall, Blocks.swampClay);
  220.        
  221.         addStairs(Blocks.cbBlue, Blocks.cbBlueStairs);
  222.         addStairs(Blocks.cbRed, Blocks.cbRedStairs);
  223.         addStairs(Blocks.cbGreen, Blocks.cbGreenStairs);
  224.         addStairs(Blocks.cbPurple, Blocks.cbPurpleStairs);
  225.         addStairs(Blocks.cbCyan, Blocks.cbCyanStairs);
  226.         addStairs(Blocks.cbPink, Blocks.cbPinkStairs);
  227.         addStairs(Blocks.cbYellow, Blocks.cbYellowStairs);
  228.         addStairs(Blocks.cbWhite, Blocks.cbWhiteStairs);
  229.         addStairs(Blocks.cbBlack, Blocks.cbBlackStairs);
  230.         addStairs(Blocks.cbOrange, Blocks.cbOrangeStairs);
  231.         addStairs(Blocks.cbBrown, Blocks.cbBrownStairs);
  232.         addStairs(Blocks.cbMagenta, Blocks.cbMagentaStairs);
  233.         addStairs(Blocks.cbLightBlue, Blocks.cbLightBlueStairs);
  234.         addStairs(Blocks.cbGray, Blocks.cbGrayStairs);
  235.         addStairs(Blocks.cbLightGray, Blocks.cbLightGrayStairs);
  236.         addStairs(Blocks.cbLime, Blocks.cbLimeStairs);
  237.         addStairs(Blocks.marbleBlock, Blocks.marbleStairs);
  238.         addStairs(Blocks.blackMarbleBlock, Blocks.blackMarbleStairs);
  239.        
  240.         // Not bricks
  241.         addBricks(Items.shineDust, Blocks.shineStone);
  242.        
  243.         /*
  244.          * Smelting
  245.          */
  246.        
  247.         int input = Blocks.spcOre.blockID;
  248.         ItemStack output = new ItemStack(Items.spcItem, 2);
  249.         float xp = 5F;
  250.         GameRegistry.addSmelting(input, output, xp);
  251.        
  252.         int input2 = Blocks.spcNetherOre.blockID;
  253.         ItemStack output2 = new ItemStack(Blocks.spcOre, 2);
  254.         float xp2 = 10F;
  255.         GameRegistry.addSmelting(input2, output2, xp2);
  256.        
  257.         int input3 = Item.rottenFlesh.itemID;
  258.         ItemStack output3 = new ItemStack(Item.leather, 1);
  259.         float xp3 = 2F;
  260.         GameRegistry.addSmelting(input3, output3, xp3);
  261.        
  262.         int input4 = Block.gravel.blockID;
  263.         ItemStack output4 = new ItemStack(Blocks.betterGlass, 1);
  264.         float xp4 = 2F;
  265.         GameRegistry.addSmelting(input4, output4, xp4);
  266.        
  267.         int input5 = Blocks.fnOre.blockID;
  268.         ItemStack output5 = new ItemStack(Items.fuelonite, 2);
  269.         float xp5 = 10F;
  270.         GameRegistry.addSmelting(input5, output5, xp5);
  271.        
  272.         int input6 = Items.fuelonite.itemID;
  273.         ItemStack output6 = new ItemStack(Items.fuelIngot, 2);
  274.         float xp6 = 20F;
  275.         GameRegistry.addSmelting(input6, output6, xp6);
  276.        
  277.         int input7 = Item.egg.itemID;
  278.         int randInt = (new Random()).nextInt(2);
  279.         int numberOfEggs = (randInt > 0) ? randInt : 1;
  280.         ItemStack output7 = new ItemStack(Items.friedEgg, numberOfEggs);
  281.         float xp7 = 5F;
  282.         GameRegistry.addSmelting(input7, output7, xp7);
  283.        
  284.         int input8 = Items.swampClayBall.itemID;
  285.         ItemStack output8 = new ItemStack(Item.brick, 1);
  286.         float xp8 = 5F;
  287.         GameRegistry.addSmelting(input8, output8, xp8);
  288.        
  289.         int input9 = Blocks.swampClay.blockID;
  290.         ItemStack output9 = new ItemStack(Block.brick, 1);
  291.         float xp9 = 8F;
  292.         GameRegistry.addSmelting(input9, output9, xp9);
  293.        
  294.         // ========[PULVERIZERDATA]========
  295.        
  296.         // Regular SPC Ore
  297.         NBTTagCompound spcSend = new NBTTagCompound();
  298.         spcSend.setInteger("energy", 50);
  299.         spcSend.setCompoundTag("input", new NBTTagCompound());
  300.         spcSend.setCompoundTag("output", new NBTTagCompound());
  301.         spcSend.setCompoundTag("secondaryOutput", new NBTTagCompound());
  302.        
  303.         (new ItemStack(Blocks.spcOre, 1)).writeToNBT(spcSend
  304.                 .getCompoundTag("input"));
  305.         (new ItemStack(Items.spcItem, 2)).writeToNBT(spcSend
  306.                 .getCompoundTag("output"));
  307.         (new ItemStack(Item.coal, 1)).writeToNBT(spcSend
  308.                 .getCompoundTag("secondaryOutput"));
  309.         spcSend.setInteger("secondaryChance", 15);
  310.         FMLInterModComms.sendMessage("ThermalExpansion",
  311.                 "PulverizerRecipe",
  312.                 spcSend);
  313.        
  314.         // Nether SPC Ore
  315.         NBTTagCompound spcnSend = new NBTTagCompound();
  316.         spcnSend.setInteger("energy", 75);
  317.         spcnSend.setCompoundTag("input", new NBTTagCompound());
  318.         spcnSend.setCompoundTag("output", new NBTTagCompound());
  319.         spcnSend.setCompoundTag("secondaryOutput", new NBTTagCompound());
  320.        
  321.         (new ItemStack(Blocks.spcNetherOre, 1)).writeToNBT(spcnSend
  322.                 .getCompoundTag("input"));
  323.         (new ItemStack(Items.spcItem, 4)).writeToNBT(spcnSend
  324.                 .getCompoundTag("output"));
  325.         (new ItemStack(Item.coal, 2)).writeToNBT(spcnSend
  326.                 .getCompoundTag("secondaryOutput"));
  327.         spcnSend.setInteger("secondaryChance", 20);
  328.         FMLInterModComms.sendMessage("ThermalExpansion",
  329.                 "PulverizerRecipe",
  330.                 spcnSend);
  331.        
  332.         // Ender SPC Ore
  333.         NBTTagCompound spceSend = new NBTTagCompound();
  334.         spceSend.setInteger("energy", 90);
  335.         spceSend.setCompoundTag("input", new NBTTagCompound());
  336.         spceSend.setCompoundTag("output", new NBTTagCompound());
  337.        
  338.         (new ItemStack(Blocks.enderSpcOre, 1)).writeToNBT(spceSend
  339.                 .getCompoundTag("input"));
  340.         (new ItemStack(Items.spcItem, 6)).writeToNBT(spceSend
  341.                 .getCompoundTag("output"));
  342.         FMLInterModComms.sendMessage("ThermalExpansion",
  343.                 "PulverizerRecipe",
  344.                 spceSend);
  345.        
  346.         // Regular FN Ore
  347.         NBTTagCompound fSend = new NBTTagCompound();
  348.         fSend.setInteger("energy", 60);
  349.         fSend.setCompoundTag("input", new NBTTagCompound());
  350.         fSend.setCompoundTag("output", new NBTTagCompound());
  351.        
  352.         (new ItemStack(Blocks.fueltonium, 1)).writeToNBT(fSend
  353.                 .getCompoundTag("input"));
  354.         (new ItemStack(Items.fuelonite, 2)).writeToNBT(fSend
  355.                 .getCompoundTag("output"));
  356.         FMLInterModComms.sendMessage("ThermalExpansion",
  357.                 "PulverizerRecipe",
  358.                 fSend);
  359.        
  360.         // Nether FN Ore
  361.         NBTTagCompound fnSend = new NBTTagCompound();
  362.         fnSend.setInteger("energy", 80);
  363.         fnSend.setCompoundTag("input", new NBTTagCompound());
  364.         fnSend.setCompoundTag("output", new NBTTagCompound());
  365.        
  366.         (new ItemStack(Blocks.fnOre, 1)).writeToNBT(fnSend
  367.                 .getCompoundTag("input"));
  368.         (new ItemStack(Items.fuelonite, 4)).writeToNBT(fnSend
  369.                 .getCompoundTag("output"));
  370.         FMLInterModComms.sendMessage("ThermalExpansion",
  371.                 "PulverizerRecipe",
  372.                 fnSend);
  373.        
  374.         // Ender FN Ore
  375.         NBTTagCompound feSend = new NBTTagCompound();
  376.         feSend.setInteger("energy", 100);
  377.         feSend.setCompoundTag("input", new NBTTagCompound());
  378.         feSend.setCompoundTag("output", new NBTTagCompound());
  379.        
  380.         (new ItemStack(Blocks.enderFnOre, 1)).writeToNBT(feSend
  381.                 .getCompoundTag("input"));
  382.         (new ItemStack(Items.fuelonite, 6)).writeToNBT(feSend
  383.                 .getCompoundTag("output"));
  384.         FMLInterModComms.sendMessage("ThermalExpansion",
  385.                 "PulverizerRecipe",
  386.                 feSend);
  387.        
  388.         // Fueltonium Ingot
  389.         NBTTagCompound fiSend = new NBTTagCompound();
  390.         fiSend.setInteger("energy", 25);
  391.         fiSend.setCompoundTag("input", new NBTTagCompound());
  392.         fiSend.setCompoundTag("output", new NBTTagCompound());
  393.        
  394.         (new ItemStack(Items.fuelIngot, 1)).writeToNBT(fiSend
  395.                 .getCompoundTag("input"));
  396.         (new ItemStack(Items.fuelonite, 1)).writeToNBT(fiSend
  397.                 .getCompoundTag("output"));
  398.         FMLInterModComms.sendMessage("ThermalExpansion",
  399.                 "PulverizerRecipe",
  400.                 fiSend);
  401.        
  402.         // ========[/PULVERIZERDATA]========
  403.        
  404.     }
  405.    
  406.     public static void addBricks(Item coloredBrick, Block coloredBlock) {
  407.         GameRegistry.addRecipe(new ItemStack(coloredBlock, 1), new Object[] {
  408.                 "CC ", "CC ", "   ", 'C', coloredBrick
  409.         });
  410.         GameRegistry.addShapelessRecipe(new ItemStack(coloredBrick, 4),
  411.                 new Object[] {
  412.                 coloredBlock
  413.                 });
  414.     }
  415.    
  416.     public static void addStairs(Block buildingBlock, Block stairBlock) {
  417.         GameRegistry.addRecipe(new ItemStack(stairBlock, 3), new Object[] {
  418.                 "  C", " CC", "CCC", 'C', buildingBlock
  419.         });
  420.         GameRegistry.addRecipe(new ItemStack(stairBlock, 3), new Object[] {
  421.                 "C  ", "CC ", "CCC", 'C', buildingBlock
  422.         });
  423.     }
  424. }
Advertisement
Add Comment
Please, Sign In to add comment