Package forestry.api.client.apiculture
Interface IBeeClientManager
public interface IBeeClientManager
Tracks client-only concerns for bee species: model locations, and the ambient particles bees emit
while working.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBeeHiveParticles(IBeeHousing housing, IGenome genome, List<net.minecraft.core.BlockPos> flowerPositions) Spawns the ambient particles for a bee working in a hive or apiary.Collection<net.minecraft.resources.ResourceLocation> getAllModelLocations(ILifeStage stage) Retrieves every distinct model location used to display bees with the given life stage, including the default model and all custom models registered for that stage.net.minecraft.resources.ResourceLocationRetrieves the default model location used to display bees of the given life stage when no custom model is registered for their species, set byIClientRegistration.setDefaultBeeModel(forestry.api.core.genetics.ILifeStage, net.minecraft.resources.ResourceLocation).net.minecraft.resources.ResourceLocationgetModelLocation(ILifeStage stage, net.minecraft.resources.ResourceLocation speciesId) Retrieves the model location used to display a bee of the given species and life stage.
-
Method Details
-
getModelLocation
net.minecraft.resources.ResourceLocation getModelLocation(ILifeStage stage, net.minecraft.resources.ResourceLocation speciesId) Retrieves the model location used to display a bee of the given species and life stage. To add a custom model for your bee, useIClientRegistration.setCustomBeeModel(net.minecraft.resources.ResourceLocation, forestry.api.core.genetics.ILifeStage, net.minecraft.resources.ResourceLocation). If no custom model is set for the species, then the default model for the given life stage will be used instead, which is set byIClientRegistration.setDefaultBeeModel(forestry.api.core.genetics.ILifeStage, net.minecraft.resources.ResourceLocation).- Parameters:
stage- The life stage to retrieve the bee model for.speciesId- The id of the bee species to retrieve the model for.- Returns:
- The model location for the given species and life stage.
-
getDefaultModelLocation
Retrieves the default model location used to display bees of the given life stage when no custom model is registered for their species, set byIClientRegistration.setDefaultBeeModel(forestry.api.core.genetics.ILifeStage, net.minecraft.resources.ResourceLocation).- Parameters:
stage- The life stage to retrieve the default bee model for.- Returns:
- The default model location for the given life stage.
-
getAllModelLocations
Retrieves every distinct model location used to display bees with the given life stage, including the default model and all custom models registered for that stage. UnlikegetModelLocation(forestry.api.core.genetics.ILifeStage, net.minecraft.resources.ResourceLocation), this does not require knowledge of the (possibly datapack-driven) species list, since it is derived entirely from the models registered byIClientRegistration.- Parameters:
stage- The life stage to retrieve bee model locations for.- Returns:
- All distinct model locations for the given life stage. (Ex. all drone models)
-
addBeeHiveParticles
void addBeeHiveParticles(IBeeHousing housing, IGenome genome, List<net.minecraft.core.BlockPos> flowerPositions) Spawns the ambient particles for a bee working in a hive or apiary. Client-side only.- Parameters:
housing- The hive or apiary the bee resides ingenome- The genome of the working beeflowerPositions- The flower positions the bee is servicing
-