Class AttachedToLeavesDecorator.Builder
java.lang.Object
dev.wyck.worldgen.feature.treedecorators.AttachedToLeavesDecorator.Builder
- Enclosing interface:
AttachedToLeavesDecorator
Builder for
AttachedToLeavesDecorator.- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockProvider(BlockStateProvider blockProvider) Sets the block of the decoration.build()Builds the attached to leaves decorator.Adds one or more directions to generate.directions(List<BlockFace> directions) Sets the directions to generate.exclusionRadiusXZ(int exclusionRadiusXZ) Sets the minimum horizontal distance between two decorations, between 0 and 16 (inclusive).exclusionRadiusY(int exclusionRadiusY) Sets the minimum vertical distance between two decorations, between 0 and 16 (inclusive).probability(float probability) Sets the probability of attaching a block, between 0.0F and 1.0F (inclusive).requiredEmptyBlocks(int requiredEmptyBlocks) Sets the number of empty blocks required by the decoration, between 0 and 16 (inclusive).
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
probability
Sets the probability of attaching a block, between 0.0F and 1.0F (inclusive).- Parameters:
probability- the probability- Returns:
- this builder
- Since:
- 3.0.0
-
exclusionRadiusXZ
Sets the minimum horizontal distance between two decorations, between 0 and 16 (inclusive).- Parameters:
exclusionRadiusXZ- the horizontal exclusion radius- Returns:
- this builder
- Since:
- 3.0.0
-
exclusionRadiusY
Sets the minimum vertical distance between two decorations, between 0 and 16 (inclusive).- Parameters:
exclusionRadiusY- the vertical exclusion radius- Returns:
- this builder
- Since:
- 3.0.0
-
blockProvider
@AsOf("3.0.0") public AttachedToLeavesDecorator.Builder blockProvider(BlockStateProvider blockProvider) Sets the block of the decoration.- Parameters:
blockProvider- the block state provider- Returns:
- this builder
- Since:
- 3.0.0
-
requiredEmptyBlocks
@AsOf("3.0.0") public AttachedToLeavesDecorator.Builder requiredEmptyBlocks(int requiredEmptyBlocks) Sets the number of empty blocks required by the decoration, between 0 and 16 (inclusive).- Parameters:
requiredEmptyBlocks- the number of required empty blocks- Returns:
- this builder
- Since:
- 3.0.0
-
directions
Sets the directions to generate. Cannot be empty.- Parameters:
directions- the directions- Returns:
- this builder
- Since:
- 3.0.0
-
direction
Adds one or more directions to generate.- Parameters:
direction- the directions to add- Returns:
- this builder
- Since:
- 3.0.0
-
build
Builds the attached to leaves decorator.- Returns:
- a new attached to leaves decorator
- Since:
- 3.0.0
-