Class HarvestDrop

java.lang.Object
ke.ric.gardening.data.HarvestDrop

public class HarvestDrop extends Object
Represents a potential drop from harvesting a crop.
  • Constructor Details

    • HarvestDrop

      public HarvestDrop(String itemId, int minAmount, int maxAmount, double chance, boolean requiresFortune)
  • Method Details

    • getItemId

      public String getItemId()
    • getMinAmount

      public int getMinAmount()
    • getMaxAmount

      public int getMaxAmount()
    • getChance

      public double getChance()
    • requiresFortune

      public boolean requiresFortune()
    • calculateDropAmount

      public int calculateDropAmount(int fortuneLevel)
      Calculate the actual drop amount based on chance and fortune level.
      Parameters:
      fortuneLevel - The fortune enchantment level (0 if none)
      Returns:
      The amount to drop, or 0 if the drop doesn't occur