Package forestry.api.apiculture.hives
Interface IHiveGen
public interface IHiveGen
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanReplace(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) returns true if the hive can safely replace the block at this location.net.minecraft.core.BlockPosgetPosForHive(net.minecraft.world.level.WorldGenLevel level, int posX, int posZ) static booleanisTreeBlock(net.minecraft.world.level.block.state.BlockState state) booleanisValidLocation(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) returns true if the hive can be generated at this location.
-
Method Details
-
getPosForHive
@Nullable net.minecraft.core.BlockPos getPosForHive(net.minecraft.world.level.WorldGenLevel level, int posX, int posZ) - Returns:
- The position including X, Y, and Z coordinates to place the hive at, or
nullif the hive can't generate at the given posX and posZ coordinates.
-
isValidLocation
boolean isValidLocation(net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) returns true if the hive can be generated at this location. Used for advanced conditions, like checking that the ground below the hive is a certain type. -
canReplace
boolean canReplace(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.WorldGenLevel world, net.minecraft.core.BlockPos pos) returns true if the hive can safely replace the block at this location. -
isTreeBlock
static boolean isTreeBlock(net.minecraft.world.level.block.state.BlockState state)
-