Package forestry.api.apiculture.genetics
Interface IBee
- All Superinterfaces:
IIndividual,IIndividualLiving
Other implementations than Forestry's default one are not supported.
-
Field Summary
Fields inherited from interface forestry.api.genetics.IIndividual
CAPABILITY_ID -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copies this individual and all of its properties EXCEPT FOR ITS MATE.copyWithGenome(IGenome newGenome) Copies the individual and all of its properties EXCEPT FOR ITS MATE.doEffect(IEffectData[] storedData, IBeeHousing housing) doFX(IEffectData[] storedData, IBeeHousing housing) Iterator<net.minecraft.core.BlockPos.MutableBlockPos>getAreaIterator(IBeeHousing housing) getCanWork(IBeeHousing housing) Determines whether the queen can work.intList<net.minecraft.world.item.ItemStack>List<net.minecraft.world.item.ItemStack>List<net.minecraft.core.Holder.Reference<net.minecraft.world.level.biome.Biome>>getSuitableBiomes(net.minecraft.core.Registry<net.minecraft.world.level.biome.Biome> registry) getType()booleannet.minecraft.core.BlockPosplantFlowerRandom(IBeeHousing housing, List<net.minecraft.world.level.block.state.BlockState> potentialFlowers) Plants a random flower from the given list near the housingbooleanpollinateRandom(IBeeHousing housing, IPollen<?> pollen) List<net.minecraft.world.item.ItemStack>produceStacks(IBeeHousing housing) IPollen<?>retrievePollen(IBeeHousing housing) voidsetPristine(boolean flag) Set the natural flag on this bee.spawnDrones(IBeeHousing housing) spawnPrincess(IBeeHousing housing) Methods inherited from interface forestry.api.genetics.IIndividual
analyze, cast, createStack, getGenome, getMate, getMateOptional, hasGlint, isAnalyzed, isSecret, saveToStack, setMateMethods inherited from interface forestry.api.genetics.IIndividualLiving
age, getHealth, getMaxHealth, isAlive, setHealth
-
Method Details
-
isPristine
boolean isPristine()- Returns:
- true if the individual is originally of pristine/natural origin.
-
getGeneration
int getGeneration()- Returns:
- generation this individual is removed from the original individual.
-
setPristine
void setPristine(boolean flag) Set the natural flag on this bee. -
doEffect
-
doFX
-
getCanWork
Determines whether the queen can work.- Parameters:
housing- theIBeeHousingthe bee currently resides in.- Returns:
- an empty set if the queen can work, a set of error states if the queen can not work
-
getSuitableBiomes
List<net.minecraft.core.Holder.Reference<net.minecraft.world.level.biome.Biome>> getSuitableBiomes(net.minecraft.core.Registry<net.minecraft.world.level.biome.Biome> registry) -
getProduceList
List<net.minecraft.world.item.ItemStack> getProduceList()- Returns:
- A list of item stacks used for displaying this bee's products in the Analyzer GUI.
-
getSpecialtyList
List<net.minecraft.world.item.ItemStack> getSpecialtyList()- Returns:
- A list of item stacks used for displaying this bee's specialty products in the Analyzer GUI.
-
produceStacks
-
spawnPrincess
-
spawnDrones
-
plantFlowerRandom
@Nullable net.minecraft.core.BlockPos plantFlowerRandom(IBeeHousing housing, List<net.minecraft.world.level.block.state.BlockState> potentialFlowers) Plants a random flower from the given list near the housing- Parameters:
housing- the location the bee is livingpotentialFlowers- the flowers to choose from- Returns:
- the position of the planted flower, or null of none were planted
-
retrievePollen
-
pollinateRandom
-
getAreaIterator
-
copy
IBee copy()Description copied from interface:IIndividualCopies this individual and all of its properties EXCEPT FOR ITS MATE. Override this method in subclasses to make sure all information is copied.- Specified by:
copyin interfaceIIndividual- Specified by:
copyin interfaceIIndividualLiving- Returns:
- An exact copy of this individual with NO MATE and NOT ANALYZED.
-
copyWithGenome
Description copied from interface:IIndividualCopies the individual and all of its properties EXCEPT FOR ITS MATE. However, the supplied newGenome is used instead of this individual's genome. Override this method in subclasses to make sure all information is copied.- Specified by:
copyWithGenomein interfaceIIndividual- Parameters:
newGenome- The genome to use for the copied individual.- Returns:
- A copy of this individual with the given genome with NO MATE and NOT ANALYZED.
-
getType
IBeeSpeciesType getType()- Specified by:
getTypein interfaceIIndividual- Returns:
- The species type of this individual.
-
getSpecies
IBeeSpecies getSpecies()- Specified by:
getSpeciesin interfaceIIndividual- Returns:
- The active species of this individual. Prefer this method over getting it from
IIndividual.getGenome().
-
getInactiveSpecies
IBeeSpecies getInactiveSpecies()- Specified by:
getInactiveSpeciesin interfaceIIndividual- Returns:
- The inactive species of the individual. Prefer this method over getting it from
IIndividual.getGenome().
-