Class HarvestDrop
java.lang.Object
ke.ric.gardening.data.HarvestDrop
Represents a potential drop from harvesting a crop.
-
Constructor Summary
ConstructorsConstructorDescriptionHarvestDrop(String itemId, int minAmount, int maxAmount, double chance, boolean requiresFortune) -
Method Summary
Modifier and TypeMethodDescriptionintcalculateDropAmount(int fortuneLevel) Calculate the actual drop amount based on chance and fortune level.doubleintintboolean
-
Constructor Details
-
HarvestDrop
public HarvestDrop(String itemId, int minAmount, int maxAmount, double chance, boolean requiresFortune)
-
-
Method Details
-
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
-