Interface IFlowerType

All Superinterfaces:
IRegistryAlleleValue

public interface IFlowerType extends IRegistryAlleleValue
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.

    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:
      true if 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.