HarvestEntry
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import mods.botanypotstweaker.crop.HarvestEntry;
Description
Represents the output of a cropMembers
Getter
Gets the chance for this entry to happenscript.zs
// HarvestEntry.chance as floatmyHarvestEntry.chance
Return Type:
float
Getter
Gets the item to give.script.zs
// HarvestEntry.item as IItemStackmyHarvestEntry.item
Return Type:
IItemStack
Getter
Gets the highest amount of the item to give.script.zs
// HarvestEntry.maxRolls as intmyHarvestEntry.maxRolls
Return Type:
int
Getter
Gets the lowest amount of the item to give.script.zs
// HarvestEntry.minRolls as intmyHarvestEntry.minRolls
Return Type:
int
static of(chance as float, item as IItemStack, minRolls as int = 1, maxRolls as int = 1) as HarvestEntry
Creates a new HarvestEntry.script.zs
Returns: a new harvest entry with the given values.
// HarvestEntry.of(chance as float, item as IItemStack, minRolls as int = 1, maxRolls as int = 1) as HarvestEntry;HarvestEntry.of(myFloat, myIItemStack, myInt, myInt);
Parameters:
chance: float
Type: float
- The chance for this entry to happen. minRolls: int
(optional) Type: int
- The lowest amount of the item to give.
Default Value: 1
maxRolls: int
(optional) Type: int
- The maximum amount of the item to give.
Default Value: 1
Return Type:
HarvestEntry