Advertisement
Hightension

Untitled

Apr 5th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. package eu.mccluster.mod.forgecraftingmanager;
  2.  
  3. import net.minecraft.inventory.InventoryCrafting;
  4. import net.minecraft.item.ItemStack;
  5. import net.minecraft.item.crafting.IRecipe;
  6. import net.minecraft.world.World;
  7. import net.minecraftforge.registries.IForgeRegistryEntry;
  8.  
  9. public class EmptyRecipe extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe
  10. {
  11.     private final ItemStack output;
  12.  
  13.     public EmptyRecipe(ItemStack output)
  14.     {
  15.         this.output = output;
  16.     }
  17.  
  18.     public static IRecipe from(IRecipe other)
  19.     {
  20.         return new EmptyRecipe(other.getRecipeOutput()).setRegistryName(other.getRegistryName());
  21.     }
  22.  
  23.     @Override
  24.     public boolean matches(InventoryCrafting inv, World worldIn)
  25.     {
  26.         return false;
  27.     }
  28.  
  29.     @Override
  30.     public ItemStack getCraftingResult(InventoryCrafting inv)
  31.     {
  32.         return ItemStack.EMPTY;
  33.     }
  34.  
  35.     @Override
  36.     public boolean canFit(int width, int height)
  37.     {
  38.         return false;
  39.     }
  40.  
  41.     @Override
  42.     public ItemStack getRecipeOutput()
  43.     {
  44.         return output;
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement