Interface UpwardsBranchingTrunkPlacer
- All Superinterfaces:
TrunkPlacer, Wrapper
Places a straight trunk with branches extending up and outwards from the trunk.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface TrunkPlacer
TrunkPlacer.TrunkPlacerBuilder<T,P> -
Field Summary
Fields inherited from interface TrunkPlacer
MAX_BASE_HEIGHT, MAX_RAND -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.Represents blocks that tree trunks can grow through.Generates extra branch length.The number of steps to generate extra branches.static UpwardsBranchingTrunkPlacerof(int baseHeight, int heightRandA, int heightRandB, IntProvider extraBranchSteps, float placeBranchPerLogProbability, IntProvider extraBranchLength, Set<Material> canGrowThrough) Creates a new upwards branching trunk placer.floatThe probability of each log producing a branch between 0.0 and 1.0.Converts this object back to a builder.Methods inherited from interface TrunkPlacer
baseHeight, heightRandA, heightRandBMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
extraBranchSteps
The number of steps to generate extra branches. Must be positive.- Returns:
- the number of steps to generate extra branches
- Since:
- 3.0.0
-
placeBranchPerLogProbability
The probability of each log producing a branch between 0.0 and 1.0.- Returns:
- the probability of each log producing a branch
- Since:
- 3.0.0
-
extraBranchLength
Generates extra branch length. Must be positive.- Returns:
- the extra branch length
- Since:
- 3.0.0
-
canGrowThrough
-
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 UpwardsBranchingTrunkPlacer of(int baseHeight, int heightRandA, int heightRandB, IntProvider extraBranchSteps, float placeBranchPerLogProbability, IntProvider extraBranchLength, Set<Material> canGrowThrough) Creates a new upwards branching trunk placer.- Parameters:
baseHeight- the base height of the trunkheightRandA- the random height modifierheightRandB- the random height modifierextraBranchSteps- the number of steps to generate extra branchesplaceBranchPerLogProbability- the probability of each log producing a branchextraBranchLength- the extra branch lengthcanGrowThrough- the blocks that tree trunks can grow through- Returns:
- a new upwards branching trunk placer
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-