Interface IHiveBuilder


public interface IHiveBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    Used to add custom implementations of IHiveDrop to this hive's drops.
    default IHiveBuilder
    addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems)
     
    default IHiveBuilder
    addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems, float ignobleChance)
     
    addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems, float ignobleChance, Map<IChromosome<?>,Allele<?>> alleles)
    Adds a bee to this hive's drops, along with any extra items associated with that bee.
    setGenerationChance(float generationChance)
    Changes the generation chance of the hive.
  • Method Details

    • addDrop

      default IHiveBuilder addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems)
    • addDrop

      default IHiveBuilder addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems, float ignobleChance)
    • addDrop

      IHiveBuilder addDrop(double chance, net.minecraft.resources.ResourceLocation speciesId, Supplier<List<net.minecraft.world.item.ItemStack>> extraItems, float ignobleChance, Map<IChromosome<?>,Allele<?>> alleles)
      Adds a bee to this hive's drops, along with any extra items associated with that bee. Princess drops are rolled up to 10 times or until a princess drop is added, whichever comes first. Drone drops and extra drops are rolled only once.
      Parameters:
      chance - The chance for this drop to be chosen per roll.
      speciesId - The ID of the bee species to add.
      extraItems - The extra items that should drop with this species.
      ignobleChance - The chance that the princess dropped is Ignoble Stock instead of Pristine Stock.
      alleles - A map of alleles to be set on the bee when it is dropped.
    • addCustomDrop

      IHiveBuilder addCustomDrop(IHiveDrop drop)
      Used to add custom implementations of IHiveDrop to this hive's drops.
      Parameters:
      drop - The supplier of the drop. Called after items and bee species are all registered.
    • setGenerationChance

      IHiveBuilder setGenerationChance(float generationChance)
      Changes the generation chance of the hive.

      1.0 is the baseline chance; higher numbers spawn more hives, lower numbers spawn fewer. Tree hives generally want 3.0–4.0 because their valid placement set is much smaller than ground hives. Returns this so the call chains cleanly with IApicultureRegistration.registerHive(net.minecraft.resources.ResourceLocation, forestry.api.apiculture.hives.IHiveDefinition) / addDrop(double, net.minecraft.resources.ResourceLocation, java.util.function.Supplier<java.util.List<net.minecraft.world.item.ItemStack>>).

      Since:
      1.1.1