SpeedCraftFunctional.java 857 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. import net.minecraft.client.gui.Screen;
  7. public interface SpeedCraftFunctional<T extends RecipeDisplay> {
  8. /**
  9. * Gets the classes that it is functioning for
  10. *
  11. * @return the array of classes
  12. */
  13. Class[] getFunctioningFor();
  14. /**
  15. * Performs the auto crafting
  16. *
  17. * @param screen the current screen
  18. * @param recipe the current recipe
  19. * @return whether it worked
  20. */
  21. boolean performAutoCraft(Screen screen, T recipe);
  22. /**
  23. * Gets if this functional accepts the auto crafting
  24. *
  25. * @param screen the current screen
  26. * @param recipe the current recipe
  27. * @return whether it is accepted
  28. */
  29. boolean acceptRecipe(Screen screen, T recipe);
  30. }