Interface IBee

All Superinterfaces:
IIndividual, IIndividualLiving

public interface IBee extends IIndividualLiving
Other implementations than Forestry's default one are not supported.
  • 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

      IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing)
    • doFX

      IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing)
    • getCanWork

      Set<IError> getCanWork(IBeeHousing housing)
      Determines whether the queen can work.
      Parameters:
      housing - the IBeeHousing the 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

      List<net.minecraft.world.item.ItemStack> produceStacks(IBeeHousing housing)
    • spawnPrincess

      @Nullable IBee spawnPrincess(IBeeHousing housing)
    • spawnDrones

      List<IBee> spawnDrones(IBeeHousing housing)
    • 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 living
      potentialFlowers - the flowers to choose from
      Returns:
      the position of the planted flower, or null of none were planted
    • retrievePollen

      @Nullable IPollen<?> retrievePollen(IBeeHousing housing)
    • pollinateRandom

      boolean pollinateRandom(IBeeHousing housing, IPollen<?> pollen)
    • getAreaIterator

      Iterator<net.minecraft.core.BlockPos.MutableBlockPos> getAreaIterator(IBeeHousing housing)
    • copy

      IBee copy()
      Description copied from interface: IIndividual
      Copies 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:
      copy in interface IIndividual
      Specified by:
      copy in interface IIndividualLiving
      Returns:
      An exact copy of this individual with NO MATE and NOT ANALYZED.
    • copyWithGenome

      IBee copyWithGenome(IGenome newGenome)
      Description copied from interface: IIndividual
      Copies 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:
      copyWithGenome in interface IIndividual
      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:
      getType in interface IIndividual
      Returns:
      The species type of this individual.
    • getSpecies

      IBeeSpecies getSpecies()
      Specified by:
      getSpecies in interface IIndividual
      Returns:
      The active species of this individual. Prefer this method over getting it from IIndividual.getGenome().
    • getInactiveSpecies

      IBeeSpecies getInactiveSpecies()
      Specified by:
      getInactiveSpecies in interface IIndividual
      Returns:
      The inactive species of the individual. Prefer this method over getting it from IIndividual.getGenome().