Class CraftingOperation
java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.operations.CraftingOperation
- All Implemented Interfaces:
MachineOperation
This
MachineOperation
represents a crafting process.- Author:
- TheBusyBiscuit
-
Constructor Summary
ConstructorDescriptionCraftingOperation
(MachineRecipe recipe) CraftingOperation
(ItemStack[] ingredients, ItemStack[] results, int totalTicks) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProgress
(int num) This method adds the given amount of ticks to the progress.int
This returns the amount of progress that has been made.int
This returns the amount of total ticks thisMachineOperation
takes to complete.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.machines.MachineOperation
getRemainingTicks, isFinished, onCancel
-
Constructor Details
-
CraftingOperation
-
CraftingOperation
-
-
Method Details
-
addProgress
public void addProgress(int num) Description copied from interface:MachineOperation
This method adds the given amount of ticks to the progress.- Specified by:
addProgress
in interfaceMachineOperation
- Parameters:
num
- The amount of ticks to add to the progress
-
getIngredients
-
getResults
-
getProgress
public int getProgress()Description copied from interface:MachineOperation
This returns the amount of progress that has been made. It's basically the amount of elapsed ticks since theMachineOperation
has started.- Specified by:
getProgress
in interfaceMachineOperation
- Returns:
- The amount of elapsed ticks
-
getTotalTicks
public int getTotalTicks()Description copied from interface:MachineOperation
This returns the amount of total ticks thisMachineOperation
takes to complete.- Specified by:
getTotalTicks
in interfaceMachineOperation
- Returns:
- The amount of total ticks required.
-