Package forestry.api.apiculture.hives
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 TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStateThe hive block to be placed in the world.floatDeprecated, for removal: This API element is subject to removal in a future version.The hive generator for this hive.booleanisGoodBiome(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) returns true if the hive can be generated in these conditions.booleanisGoodHumidity(HumidityType humidity) booleanisGoodTemperature(TemperatureType temperature) voidpostGen(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
-
isGoodTemperature
-
getGenChance
Deprecated, for removal: This API element is subject to removal in a future version.Generation chance is now set byIHive. 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.
-
IHive.