Interface IHiveDefinition


public interface IHiveDefinition
The definition of a wild beehive that generates naturally in the world. Register in IApicultureRegistration.registerHive(net.minecraft.resources.ResourceLocation, forestry.api.apiculture.hives.IHiveDefinition).
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.block.state.BlockState
    The hive block to be placed in the world.
    float
    Deprecated, for removal: This API element is subject to removal in a future version.
    Generation chance is now set by IHive.
    The hive generator for this hive.
    boolean
    isGoodBiome(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
    returns true if the hive can be generated in these conditions.
    boolean
     
    boolean
     
    void
    postGen(net.minecraft.world.level.WorldGenLevel level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos)
    Called after successful hive generation.
  • Method Details

    • getHiveGen

      IHiveGen getHiveGen()
      The hive generator for this hive.
    • getBlockState

      net.minecraft.world.level.block.state.BlockState getBlockState()
      The hive block to be placed in the world.
    • isGoodBiome

      boolean isGoodBiome(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
      returns true if the hive can be generated in these conditions. Used as a fast early-elimination check for hives that have no hope of spawning in the area.
    • isGoodHumidity

      boolean isGoodHumidity(HumidityType humidity)
    • isGoodTemperature

      boolean isGoodTemperature(TemperatureType temperature)
    • getGenChance

      @Deprecated(forRemoval=true) float getGenChance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Generation chance is now set by IHive. This value is a default, but can be overridden.
      float representing the relative chance a hive will generate in a chunk. Default is 1.0, higher numbers result in more hives, smaller will result in fewer. Tree hives want around 3.0 to 4.0 since there are less locations to generate on.
      Since:
      1.1.1
    • postGen

      void postGen(net.minecraft.world.level.WorldGenLevel level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos)
      Called after successful hive generation. level, x, y, z give the location of the new hive.