Interface BonemealableGrowthType

All Superinterfaces:
GrowthType

public interface BonemealableGrowthType extends GrowthType
Variant of GrowthType that uses a default implementation for growing. The default implementation will check for an instance of BonemealableBlock, and otherwise check for any of the built-in age properties.
  • Method Details

    • canGrow

      default boolean canGrow(GrowthContext context)
      Specified by:
      canGrow in interface GrowthType
      Parameters:
      context - The GrowthContext to use.
      Returns:
      Whether the plant can currently be grown or not.
    • grow

      default void grow(GrowthContext context)
      Description copied from interface: GrowthType
      Grows the plant, if possible.
      Specified by:
      grow in interface GrowthType
      Parameters:
      context - The GrowthContext to use.
    • hasNonFullAge

      default boolean hasNonFullAge(GrowthContext context)
      Parameters:
      context - The GrowthContext to use.
      Returns:
      Whether the plant has an age property that is not full, i.e., can still grow.
    • increaseAge

      default void increaseAge(GrowthContext context)
      Helper method for increasing a plant's age property (if it has one) by one.
      Parameters:
      context - The GrowthContext to use.