Package forestry.api.apiculture.hives
Interface IHiveDefinition
public interface IHiveDefinition
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.BlockStateThe hive block to be placed in the world.floatfloat representing the relative chance a hive will generate in a chunk.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 world, 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
float getGenChance()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. -
postGen
void postGen(net.minecraft.world.level.WorldGenLevel world, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos) Called after successful hive generation. world, x, y, z give the location of the new hive.
-