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.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
IHivePlacement 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
-
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.
-