Advertisement
HalestormXV

LunariumDustRecipe

Oct 25th, 2020
1,907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. public class LunariumDustRecipe implements ILunariumDustRecipe {
  2.  
  3.     private final ResourceLocation id;
  4.     private Ingredient input;
  5.     private final ItemStack output;
  6.  
  7.     public LunariumDustRecipe(ResourceLocation id, Ingredient input, ItemStack output) //Is Flexible - can have more then one input or output.
  8.     {
  9.         this.id = id;
  10.         this.output = output;
  11.         this.input = input;
  12.     }
  13.  
  14.     @Override
  15.     public boolean matches(RecipeWrapper inv, World worldIn) {
  16.         if (this.input.test(inv.getStackInSlot(0))) {
  17.             return true;
  18.         }
  19.         return false;
  20.     }
  21.  
  22.     @Override
  23.     public ItemStack getCraftingResult(RecipeWrapper inv) {
  24.         return this.output;
  25.     }
  26.  
  27.     @Override
  28.     public ItemStack getRecipeOutput() {
  29.         return this.output;
  30.     }
  31.  
  32.     @Override
  33.     public ResourceLocation getId() {
  34.         return this.id;
  35.     }
  36.  
  37.     @Override
  38.     public IRecipeSerializer<?> getSerializer() {
  39.         return RecipeSerializerInit.LUNAR_FORGE_SERIALIZER.get();
  40.     }
  41.  
  42.     @Override
  43.     public Ingredient getInput() {
  44.         return this.input;
  45.     }
  46.  
  47.     @Override
  48.     public NonNullList<Ingredient> getIngredients() {
  49.         return NonNullList.from(null, this.input);
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement