Class FeatureLargeOakTree

All Implemented Interfaces:
Predicate<org.cloudburstmc.api.block.BlockState>, WorldFeature, BlockFilter

public class FeatureLargeOakTree extends FeatureNormalTree
Generates either a normal tree or a large oak tree.
Author:
DaPorkchop_
  • Field Details

    • DEFAULT_HEIGHT

      public static final IntRange DEFAULT_HEIGHT
    • chance

      protected final double chance
    • largeHeight

      protected final IntRange largeHeight
  • Constructor Details

    • FeatureLargeOakTree

      public FeatureLargeOakTree(@NonNull @NonNull IntRange normalHeight, @NonNull @NonNull GenerationTreeSpecies species, double chance, @NonNull @NonNull IntRange largeHeight)
    • FeatureLargeOakTree

      public FeatureLargeOakTree(@NonNull @NonNull IntRange normalHeight, @NonNull @NonNull BlockSelector wood, @NonNull @NonNull BlockSelector leaves, double chance, @NonNull @NonNull IntRange largeHeight)
  • Method Details

    • place

      public boolean place(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z)
      Description copied from interface: WorldFeature
      Tries to place this feature into the given level at the given position.
      Specified by:
      place in interface WorldFeature
      Overrides:
      place in class FeatureAbstractTree
      Parameters:
      level - the level to place the feature into
      random - an instance of PRandom for generating random numbers
      x - the X coordinate to generate the feature at
      y - the Y coordinate to generate the feature at
      z - the Z coordinate to generate the feature at
      Returns:
      whether or not the feature could be placed