Package forestry.api.core.genetics
Interface IFlowerTypeManager
public interface IFlowerTypeManager
Used to look up the flower types that pollinating species search for. Bees and butterflies both
carry a flower type chromosome, so this is owned by base rather than by either module.
- Since:
- 2.10.0
-
Method Summary
Modifier and TypeMethodDescriptionMap<net.minecraft.resources.ResourceLocation, IFlowerType> Used to get every registered flower type.getFlowerType(net.minecraft.resources.ResourceLocation id) Used to get a flower type by its id.getFlowerTypeSafe(net.minecraft.resources.ResourceLocation id) Used to get a flower type by its id, falling back to the vanilla flower type.voidsetFlowerTypes(Map<net.minecraft.resources.ResourceLocation, IFlowerType> flowerTypes) Used to install the effective flower types after a datapack load or a server sync.
-
Method Details
-
getFlowerType
Used to get a flower type by its id.- Parameters:
id- The id of the flower type- Returns:
- The flower type, or null if no flower type was registered with that id
-
getFlowerTypeSafe
Used to get a flower type by its id, falling back to the vanilla flower type.- Parameters:
id- The id of the flower type- Returns:
- The flower type, or the vanilla flower type if none was registered with that id
-
getAllFlowerTypes
Map<net.minecraft.resources.ResourceLocation,IFlowerType> getAllFlowerTypes()Used to get every registered flower type.- Returns:
- The flower types, keyed by id
-
setFlowerTypes
Used to install the effective flower types after a datapack load or a server sync.- Parameters:
flowerTypes- The flower types, keyed by id
-