SHARE
TWEET

Minecraft Wiki: Adding a Recipe

ISQ Jul 6th, 2012 315 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package net.minecraft.src;
  2.  
  3. public class mod_myMod extends BaseMod
  4. {
  5.         public void addRecipes()
  6.         {
  7.                 ModLoader.addRecipe(new ItemStack(Item.diamond, 2), new Object[] { "DDD", "DDD", "DDD", 'D', Block.cobblestone});
  8.                 ModLoader.addRecipe(new ItemStack(Block.whiteStone, 64), new Object[] { "W $", " S ", "s E", 'W', new ItemStack(Block.wood, 1, 2), '$', Item.stick, 'S', Block.sand, 's', Block.sapling, 'E', Item.enderPearl });
  9.                 ModLoader.addShapelessRecipe(new ItemStack(Block.grass, 1), new Object[] { Item.seeds, new ItemStack(Block.wood, 1, 3) });
  10.                 ModLoader.addSmelting(Block.dirt.blockID, new ItemStack(Item.dyePowder, 32, 4));
  11.         }
  12.        
  13.         public void load()
  14.         {
  15.                 this.addRecipes();
  16.         }
  17.        
  18.         public String getVersion()
  19.         {
  20.                 return "Version 1.0";
  21.         }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top