Interface PlaceOnGroundDecorator
- All Superinterfaces:
TreeDecorator, Wrapper
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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThe block of the decoration.builder()Creates a new builder.intheight()The height range within which to try positions.static PlaceOnGroundDecoratorof(int tries, int radius, int height, BlockStateProvider blockStateProvider) Creates a new place on ground decorator.intradius()The radius within which to try positions.default PlaceOnGroundDecorator.BuilderConverts this object back to a builder.inttries()The number of positions to try.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
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
The radius within which to try positions. Must be a non-negative integer. Defaults to 2.- Returns:
- the radius
- Since:
- 3.0.0
-
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
The block of the decoration.- Returns:
- the block state provider
- Since:
- 3.0.0
-
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 integerradius- the radius within which to try positions, must be a non-negative integerheight- the height range within which to try positions, must be a non-negative integerblockStateProvider- the block of the decoration- Returns:
- a new place on ground decorator
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-