drackiseries

A New Furnace Part 4 Code

Jul 17th, 2012
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.52 KB | None | 0 0
  1. COMPRESSOR RECIPES FILE:
  2.  
  3. PLEASE BARE IN MIND THAT IF YOU CREATE A FILE LIKE THIS YOU NEED TO CHANGE ALL INSTANCES OF FURNACERECIPES TO COMPRESSORRECIPES. CHECK THE FOLLOWING FILES FOR THIS, CONTAINERCOMPRESSOR.JAVA, BLOCKCOMPRESSOR.JAVA, GUICOMPRESSOR.JAVA, SLOTCOMPRESSOR.JAVA AND TILEENTITYCOMPRESSOR.JAVA.
  4.  
  5.  
  6. package net.minecraft.src;
  7.  
  8. import java.util.HashMap;
  9. import java.util.Map;
  10.  
  11. public class CompressorRecipes
  12. {
  13.     private static final CompressorRecipes compressingBase = new CompressorRecipes();
  14.  
  15.     /** The list of smelting results. */
  16.     private Map compressingList;
  17.  
  18.     /**
  19.      * Used to call methods addSmelting and getSmeltingResult.
  20.      */
  21.     public static final CompressorRecipes smelting()
  22.     {
  23.         return compressingBase;
  24.     }
  25.  
  26.     private CompressorRecipes()
  27.     {
  28.         compressingList = new HashMap();
  29.        
  30.         // addSmelting(Block.oreIron.blockID, new ItemStack(Item.ingotIron));
  31.    
  32.         addCompressing(Block.obsidian.blockID, new ItemStack(mod_tutorial.pressurePlateObsidian));
  33.     }
  34.  
  35.     /**
  36.      * Adds a smelting recipe.
  37.      */
  38.     public void addCompressing(int par1, ItemStack par2ItemStack)
  39.     {
  40.         compressingList.put(Integer.valueOf(par1), par2ItemStack);
  41.     }
  42.  
  43.     /**
  44.      * Returns the smelting result of an item.
  45.      */
  46.     public ItemStack getSmeltingResult(int par1)
  47.     {
  48.         return (ItemStack)compressingList.get(Integer.valueOf(par1));
  49.     }
  50.  
  51.     public Map getSmeltingList()
  52.     {
  53.         return compressingList;
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment