Guest User

MPUtil.java

a guest
Dec 9th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.16 KB | None | 0 0
  1. public class MPUtil
  2. {
  3.     public static void addRecipe(ItemStack item, Object... objects)
  4.     {
  5.         if (Vars.customCraftingTable && RecipeManager.canFitOnVanillaTable(item, objects))
  6.         {
  7.             GameRegistry.addRecipe(new ShapedOreRecipe(item, objects));
  8.         }
  9.         RecipeManager.add(true, item, objects);
  10.     }
  11.  
  12.     public static void addShapelessRecipe(ItemStack item, Object... objects)
  13.     {
  14.         if (Vars.customCraftingTable && RecipeManager.canFitOnVanillaTable(item, objects))
  15.         {
  16.             GameRegistry.addRecipe(new ShapelessOreRecipe(item, objects));
  17.         }
  18.         RecipeManager.addShapeless(true, item, objects);
  19.     }
  20.  
  21.     public static void addCompactRecipe(ItemStack item, ItemStack obj)
  22.     {
  23.         addRecipe(item, "###", "###", "###", '#', obj);
  24.     }
  25.  
  26.     public static void addReversedRecipe(ItemStack item, ItemStack obj)
  27.     {
  28.         item = item.copy();
  29.         item.stackSize = 9;
  30.         addRecipe(item, "#", '#', obj);
  31.     }
  32.  
  33.     public static void addCompactAndReversedRecipe(ItemStack item, ItemStack obj)
  34.     {
  35.         addCompactRecipe(item, obj);
  36.         addReversedRecipe(obj, item);
  37.     }
  38.  
  39.     public static void addSmeltingRecipe(ItemStack item, ItemStack reward, float xp)
  40.     {
  41.         GameRegistry.addSmelting(item, reward, xp);
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment