Fertilizers
Class path: mods.botanypots.Fertilizer
Use
To use, import the class with import mods.botanypots.Fertilizer;
at the beginning of your script.
Creating Fertilizers
Fertilizer.create(id, ingredient, minTick, maxTick);
id
<string> The id of the new fertilizer. This is a namespaced id an must be in the validnamespace:path
format.ingredient
<IIngredient> The item used for the fertilizer.minTick
<int> The minimum amount of ticks added by the fertilizer.maxTick
<int> The maximum amount of ticks added by the fertilizer.
Creates a new fertilizer. These can be used to grow crops faster.
Removing Fertilizers
Fertilizer.remove(id);
id
<string> The id of the fertilizer. This is a namespaced id an must be in the validnamespace:path
format.
This can be used to remove a fertilizer.
Changing Fertilizer Ticks
Fertilizer.setTicks(String id, int minTick, int maxTick);
id
<string> The id of the fertilizer. This is a namespaced id an must be in the validnamespace:path
format.minTick
<int> The new minimum amount of ticks added by the fertilizer.maxTick
<int> The new maximum amount of ticks added by the fertilizer.
This will change the growth tick range added by the fertilizer.
Changing Fertilizer Ingredients
Fertilizer.setIngredient(id, ingredient);
id
<string> The id of the fertilizer. This is a namespaced id an must be in the validnamespace:path
format.ingredient
<IIngredient> The new item to be used for the fertilizer.
Sets the ingredient item that is the fertilizer.
Getting All Ids
Fertilizer.getAllIds();
- Returns: <string[]> An array of all known fertilizer ids at the time this is ran.
This will give you an array of all the known fertilizer ids at the time.
Removing All Fertilizers
This will completely remove all the fertilizers currently registered. This is useful for if you want to recreate all the data from scratch through scripts.