BasicCrop
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.BasicCrop;
Description
A basic definition of a crop.Extends
BasicCrop extends Crop
.
Implements
BasicCrop
implements the following interfaces:
Members
Getter
Gets how the display states of the cropscript.zs
myBasicCrop.displayStates
Return Type:
DisplayState[]
Getter
Gets the amount of ticks for the crop to grow.script.zs
// BasicCrop.growthTicks as intmyBasicCrop.growthTicks
Return Type:
int
Getter
Gets the light level of the crop.script.zs
// BasicCrop.lightLevel as intmyBasicCrop.lightLevel
Return Type:
int
static of(id as ResourceLocation, seed as IIngredient, soilCategories as List<string>, growthTicks as int, results as HarvestEntry[], displayStates as DisplayState[], lightLevel as int = 0) as BasicCrop
Creates a new BasicCropscript.zs
// BasicCrop.of(id as ResourceLocation, seed as IIngredient, soilCategories as List<string>, growthTicks as int, results as HarvestEntry[], displayStates as DisplayState[], lightLevel as int = 0) as BasicCrop;BasicCrop.of(<resource:crafttweaker:soil_test>, <item:minecraft:diamond>, ["category1"], 200, [HarvestResult.of(0.75, <item:minecraft:apple>)], [<blockstate:minecraft:dirt>], 1);
Parameters:
soilCategories: List<string>
Type: List<string>
- The list of soil categories. growthTicks: int
Type: int
- The number of growth ticks. lightLevel: int
(optional) Type: int
- The optional light level that the crop will give off. Defaults to 0
Default Value: 0
Return Type:
BasicCrop
Getter
Getter
Gets the ingredient that is used as the seed for the crop.script.zs
// BasicCrop.seed as IIngredientmyBasicCrop.seed
Return Type:
IIngredient
Getter
Gets the soil categories that the crop can grow on.script.zs
// BasicCrop.soilCategories as List<string>myBasicCrop.soilCategories
Return Type:
List<string>