Class BrewingStartEvent


@Experimental public class BrewingStartEvent extends InventoryBlockStartEvent
Called when a brewing stand starts to brew.
  • Constructor Details

  • Method Details

    • getTotalBrewTime

      @Deprecated(since="1.21", forRemoval=true) public int getTotalBrewTime()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getBrewingTime() instead
      Gets the total brew time associated with this event.
      Returns:
      the total brew time
    • setTotalBrewTime

      @Deprecated(since="1.21", forRemoval=true) public void setTotalBrewTime(int brewTime)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the total brew time for this event.
      Parameters:
      brewTime - the new total brew time
    • getRecipeBrewTime

      @Experimental public @org.jetbrains.annotations.Range(from=1L, to=2147483647L) int getRecipeBrewTime()
      Gets the recipe time for the brewing process which is used to compute the progress of the brewing process with getBrewingTime().
      Returns:
      recipe brew time (in ticks)
    • setRecipeBrewTime

      @Experimental public void setRecipeBrewTime(@org.jetbrains.annotations.Range(from=1L, to=2147483647L) int recipeBrewTime)
      Sets the recipe time for the brewing process which is used to compute the progress of the brewing process with getBrewingTime().
      Parameters:
      recipeBrewTime - recipe brew time (in ticks)
      Throws:
      IllegalArgumentException - if the recipe brew time is non-positive
    • getBrewingTime

      public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int getBrewingTime()
      Gets the amount of brewing ticks left.
      Returns:
      The amount of ticks left for the brewing task
    • setBrewingTime

      public void setBrewingTime(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int brewTime)
      Sets the brewing ticks left.
      Parameters:
      brewTime - the ticks left, which is no less than 0
      Throws:
      IllegalArgumentException - if the ticks are less than 0