RecipeDisplay.java 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. import com.google.common.collect.Lists;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraft.recipe.Recipe;
  9. import net.minecraft.util.Identifier;
  10. import java.util.List;
  11. import java.util.Optional;
  12. public interface RecipeDisplay<T extends Recipe> {
  13. /**
  14. * @return the optional recipe
  15. */
  16. Optional<? extends Recipe> getRecipe();
  17. /**
  18. * @return a list of items
  19. */
  20. List<List<ItemStack>> getInput();
  21. /**
  22. * @return a list of outputs
  23. */
  24. List<ItemStack> getOutput();
  25. /**
  26. * Gets the required items used in craftable filters
  27. *
  28. * @return the list of required items
  29. */
  30. @Deprecated
  31. default List<List<ItemStack>> getRequiredItems() {
  32. return Lists.newArrayList();
  33. }
  34. /**
  35. * Gets the recipe display category identifier
  36. *
  37. * @return the identifier of the category
  38. */
  39. Identifier getRecipeCategory();
  40. }