Guest User

Untitled

a guest
Apr 9th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. package thatmartinguy.thedarkness.util;
  2.  
  3. import java.util.HashMap;
  4. import java.util.Map;
  5.  
  6. import javax.annotation.Nullable;
  7.  
  8. import net.minecraft.init.Items;
  9. import net.minecraft.item.Item;
  10. import net.minecraft.item.ItemStack;
  11. import thatmartinguy.thedarkness.item.ModItems;
  12.  
  13. public class DarkPortalCrafting
  14. {
  15.     private static Map<Item[], ItemStack> darkPortalRecipes;
  16.    
  17.     public static void init()
  18.     {
  19.         darkPortalRecipes = new HashMap<Item[], ItemStack>();
  20.        
  21.         addDarkPortalRecipe(new ItemStack(ModItems.itemShadowHead), ModItems.itemHumanHeart, Items.DIAMOND_HELMET);
  22.     }
  23.    
  24.     private static void addDarkPortalRecipe(ItemStack output, Item... inputs)
  25.     {
  26.         darkPortalRecipes.put(inputs, output);
  27.     }
  28.    
  29.     @Nullable
  30.     public static ItemStack getOutput(Item... inputs)
  31.     {
  32.         System.out.println(new ItemStack(Items.DIAMOND_HELMET).getItem());
  33.         return darkPortalRecipes.get(inputs);
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment