Package forestry.api.apiculture.hives
Interface IHive
public interface IHive
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanReplace(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) floatgetDrops()net.minecraft.world.level.block.state.BlockStatenet.minecraft.core.BlockPosgetPosForHive(net.minecraft.world.level.WorldGenLevel level, int posX, int posZ) Deprecated.default net.minecraft.core.BlockPosgetPosForHive(net.minecraft.world.level.WorldGenLevel level, net.minecraft.util.RandomSource rand, int posX, int posZ) Determines the position of a hive.booleanisGoodBiome(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) booleanisGoodHumidity(HumidityType humidity) booleanisGoodTemperature(TemperatureType temperature) booleanisValidLocation(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) voidpostGen(net.minecraft.world.level.WorldGenLevel world, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos) toString()
-
Method Details
-
getDefinition
IHiveDefinition getDefinition() -
getHiveBlockState
net.minecraft.world.level.block.state.BlockState getHiveBlockState() -
getDrops
-
genChance
float genChance() -
postGen
void postGen(net.minecraft.world.level.WorldGenLevel world, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos) -
isGoodBiome
boolean isGoodBiome(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) -
isGoodHumidity
-
isGoodTemperature
-
isValidLocation
boolean isValidLocation(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) -
canReplace
boolean canReplace(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) -
getPosForHive
@Deprecated @Nullable net.minecraft.core.BlockPos getPosForHive(net.minecraft.world.level.WorldGenLevel level, int posX, int posZ) Deprecated.UsegetPosForHive(WorldGenLevel, RandomSource, int, int)that accepts a world gen random. -
getPosForHive
@Nullable default net.minecraft.core.BlockPos getPosForHive(net.minecraft.world.level.WorldGenLevel level, net.minecraft.util.RandomSource rand, int posX, int posZ) Determines the position of a hive.- Parameters:
level- The level to generate the hive in.rand- The world generation random. Use this instead of the level random.posX- The X coordinate of the position where the hive should be generated.posZ- The Z coordinate of the position where the hive should be generated.- Returns:
- The adjusted position where the hive should be generated or
nullif no hive should be generated.
-
toString
String toString()
-
getPosForHive(WorldGenLevel, RandomSource, int, int)that accepts a world gen random.