Interface PlaceOnGroundDecorator

All Superinterfaces:
TreeDecorator, Wrapper

@NullMarked @AsOf("3.0.0") public interface PlaceOnGroundDecorator extends TreeDecorator
Tries tries() positions within the specified radius and height range to find a position that is at the height of the MOTION_BLOCKING_NO_LEAVES heightmap, is solid, and has air above. Places the specified block on the block above any matching positions.
Since:
3.0.0
See Also:
  • Method Details

    • tries

      @AsOf("3.0.0") int tries()
      The number of positions to try. Must be a positive integer. Defaults to 128.
      Returns:
      the number of tries
      Since:
      3.0.0
    • radius

      @AsOf("3.0.0") int radius()
      The radius within which to try positions. Must be a non-negative integer. Defaults to 2.
      Returns:
      the radius
      Since:
      3.0.0
    • height

      @AsOf("3.0.0") int height()
      The height range within which to try positions. Must be a non-negative integer. Defaults to 1.
      Returns:
      the height
      Since:
      3.0.0
    • blockStateProvider

      @AsOf("3.0.0") BlockStateProvider blockStateProvider()
      The block of the decoration.
      Returns:
      the block state provider
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default PlaceOnGroundDecorator.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static PlaceOnGroundDecorator of(int tries, int radius, int height, BlockStateProvider blockStateProvider)
      Creates a new place on ground decorator.
      Parameters:
      tries - the number of positions to try, must be a positive integer
      radius - the radius within which to try positions, must be a non-negative integer
      height - the height range within which to try positions, must be a non-negative integer
      blockStateProvider - the block of the decoration
      Returns:
      a new place on ground decorator
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static PlaceOnGroundDecorator.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0