Class AsyncRecipeChoiceTask
java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.tasks.AsyncRecipeChoiceTask
- All Implemented Interfaces:
Runnable
A
AsyncRecipeChoiceTask is an asynchronously repeating task that cycles
through the different variants of Material that a RecipeChoice.MaterialChoice or Tag can represent.
It is used in the SurvivalSlimefunGuide for any ItemStack from Minecraft
that accepts more than one Material in its Recipe.- Author:
- TheBusyBiscuit
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int slot, RecipeChoice.MaterialChoice choice) voidvoidclear()This method clears theAsyncRecipeChoiceTaskand removes all active iterators.booleanisEmpty()This method checks if there are any slots that need to be updated.voidrun()voidThis will start this task for the givenInventory.
-
Constructor Details
-
AsyncRecipeChoiceTask
public AsyncRecipeChoiceTask()
-
-
Method Details
-
start
This will start this task for the givenInventory.- Parameters:
inv- TheInventoryto start this task for
-
add
-
add
-
isEmpty
public boolean isEmpty()This method checks if there are any slots that need to be updated.- Returns:
- Whether this task has nothing to do
-
clear
public void clear()This method clears theAsyncRecipeChoiceTaskand removes all active iterators. -
run
public void run()
-