Advertisement
Guest User

CustomRecipe.java

a guest
Jul 5th, 2019
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. import java.util.List;
  2. import java.util.UUID;
  3.  
  4. import org.bukkit.NamespacedKey;
  5. import org.bukkit.inventory.ItemStack;
  6. import org.bukkit.inventory.Recipe;
  7. import org.ourcraft.daskrr.smp.SMP;
  8.  
  9. import com.google.common.collect.Lists;
  10.  
  11. public class CustomRecipe
  12. {
  13.     protected Recipe recipe;
  14.     protected ItemStack result;
  15.     protected List<ItemStack> ingredients = Lists.newArrayList();
  16.    
  17.     public CustomRecipe (Recipe recipe)
  18.     {
  19.         this.result = recipe.getResult();
  20.         this.recipe = recipe;
  21.     }
  22.    
  23.     public CustomRecipe (ItemStack result)
  24.     {
  25.         this.result = result;
  26.     }
  27.    
  28.     public Recipe getBukkitRecipe()
  29.     {
  30.         return recipe;
  31.     }
  32.    
  33.     public ItemStack getResult()
  34.     {
  35.         return this.result;
  36.     }
  37.    
  38.     public List<ItemStack> getIngredients()
  39.     {
  40.         return this.ingredients;
  41.     }
  42.    
  43.     protected static NamespacedKey key ()
  44.     {
  45.         NamespacedKey nmspkey = new NamespacedKey(SMP.PLUGIN, "custom_recipe_" + UUID.randomUUID().toString());
  46.        
  47. //        RecipeRegistry.RECIPES.add(nmspkey);
  48.         return nmspkey;
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement