Interface GrowthAmount

All Known Implementing Classes:
ConstantGrowthAmount, PercentageGrowthAmount, RangedGrowthAmount

public interface GrowthAmount
Calculates an amount of growth to apply to a crop based on predetermined inputs. For example, a fertilizer may use this to calculate how much growth to add.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getAmount(@NotNull BotanyPotContext context, @NotNull net.minecraft.world.level.Level level)
    Gets the amount of growth to add.
    Gets the type of the growth amount.
  • Method Details

    • getAmount

      int getAmount(@NotNull @NotNull BotanyPotContext context, @NotNull @NotNull net.minecraft.world.level.Level level)
      Gets the amount of growth to add.
      Parameters:
      context - The context of the crop being grown.
      level - The current game level.
      Returns:
      The amount of ticks to grow.
    • getType

      GrowthAmountType<?> getType()
      Gets the type of the growth amount. This is often used for serialization.
      Returns:
      The type of the growth amount.