Package forestry.api.apiculture
Interface IFlowerType
- All Superinterfaces:
IRegistryAlleleValue
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<net.minecraft.world.item.ItemStack>affectProducts(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, IIndividual individual, List<net.minecraft.world.item.ItemStack> products) Allows the flower provider to affect the produce at the given location.booleanisAcceptableFlower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Checks if the flower at the specified position is accepted by this rule.booleanplantRandomFlower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, List<net.minecraft.world.level.block.state.BlockState> nearbyFlowers) Tries to plant a random flower at a position near a hive.Methods inherited from interface forestry.api.genetics.alleles.IRegistryAlleleValue
isDominant
-
Method Details
-
isAcceptableFlower
boolean isAcceptableFlower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Checks if the flower at the specified position is accepted by this rule. -
plantRandomFlower
boolean plantRandomFlower(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, List<net.minecraft.world.level.block.state.BlockState> nearbyFlowers) Tries to plant a random flower at a position near a hive.- Parameters:
level- The current dimension of the hive.pos- The position to try to plant at.nearbyFlowers- The list of flowers already near the hive.- Returns:
trueif the flower was planted.
-
affectProducts
default List<net.minecraft.world.item.ItemStack> affectProducts(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, IIndividual individual, List<net.minecraft.world.item.ItemStack> products) Allows the flower provider to affect the produce at the given location. If this flowerProvider does not affect the products, it should return the products unchanged.
-