java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.operations.MiningOperation
All Implemented Interfaces:
MachineOperation
Direct Known Subclasses:
GEOMiningOperation

public class MiningOperation extends Object implements MachineOperation
This MachineOperation represents an operation with no inputs, only a result.
Author:
TheBusyBiscuit
  • Constructor Details

    • MiningOperation

      public MiningOperation(@Nonnull ItemStack result, int totalTicks)
  • 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 interface MachineOperation
      Parameters:
      num - The amount of ticks to add to the progress
    • getResult

      @Nonnull public ItemStack getResult()
      This returns the result of this operation, the ItemStack that will be returned in the end.
      Returns:
      The result of this operation
    • 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 the MachineOperation has started.
      Specified by:
      getProgress in interface MachineOperation
      Returns:
      The amount of elapsed ticks
    • getTotalTicks

      public int getTotalTicks()
      Description copied from interface: MachineOperation
      This returns the amount of total ticks this MachineOperation takes to complete.
      Specified by:
      getTotalTicks in interface MachineOperation
      Returns:
      The amount of total ticks required.