Interface ReplantableGrowthType

All Superinterfaces:
GrowthType

public interface ReplantableGrowthType extends GrowthType
Variant of GrowthType that separates the replanting logic from GrowthType.harvest(GrowthContext, boolean) out into separate methods.
  • Method Details

    • harvest

      default List<net.minecraft.world.item.ItemStack> harvest(GrowthContext context, boolean replant)
      Description copied from interface: GrowthType
      Harvests the plant, if possible.
      Specified by:
      harvest in interface GrowthType
      Parameters:
      context - The GrowthContext to use.
      replant - Whether the plant should be replanted or not, if possible.
      Returns:
      A list of ItemStack, representing the drops of the plant.
    • harvest

      List<net.minecraft.world.item.ItemStack> harvest(GrowthContext context)
      Harvests the plant, if possible.
      Parameters:
      context - The GrowthContext to use.
      Returns:
      A list of ItemStack, representing the drops of the plant.
    • canReplant

      boolean canReplant(GrowthContext context)
      Parameters:
      context - The GrowthContext to use.
      Returns:
      Whether the plant can currently be replanted or not.
    • replant

      void replant(GrowthContext context)
      Replants the plant, if possible.
      Parameters:
      context - The GrowthContext to use.