Interface VegetationPatchConfiguration
- All Superinterfaces:
FeatureConfiguration, Wrapper
@NullMarked
@AsOf("3.0.1")
public interface VegetationPatchConfiguration
extends FeatureConfiguration
A feature that places a patch of ground blocks, then a vegetation feature on top, searching either up
from a floor or down from a ceiling. Used by vanilla for lush cave floors and dripleaf patches.
- Since:
- 3.0.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder forVegetationPatchConfiguration. -
Field Summary
Fields inherited from interface FeatureConfiguration
NONE -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.depth()The number of blocks the patch replaces per column, between 1 and 128.floatThe chance to add one extra block to thedepth()of a column, between 0.0 and 1.0.floatThe chance to add a search position adjacent to the initial rectangle, between 0.0 and 1.0.The block used to build the patch (the "ground").static VegetationPatchConfigurationof(TagSet<Material> replaceable, BlockStateProvider groundState, PlacedFeature vegetationFeature, CaveSurface surface, IntProvider depth, float extraBottomBlockChance, int verticalRange, float vegetationChance, IntProvider xzRadius, float extraEdgeColumnChance) Creates a new vegetation patch configuration.The blocks that the patch is allowed to replace.surface()Which surface to search from and place against, eitherCaveSurface.FLOORorCaveSurface.CEILING.Converts this object back to a builder.floatThe chance of placing thevegetationFeature()on a found position, between 0.0 and 1.0.The placed feature to place on top of each found position.intThe vertical distance a column searches for an available position, between 1 and 256.xzRadius()The XZ radius searched for available positions.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
replaceable
-
groundState
The block used to build the patch (the "ground").- Returns:
- the ground state provider
- Since:
- 3.0.1
-
vegetationFeature
The placed feature to place on top of each found position.- Returns:
- the vegetation feature
- Since:
- 3.0.1
-
surface
Which surface to search from and place against, eitherCaveSurface.FLOORorCaveSurface.CEILING.- Returns:
- the surface
- Since:
- 3.0.1
-
depth
The number of blocks the patch replaces per column, between 1 and 128.- Returns:
- the depth
- Since:
- 3.0.1
-
extraBottomBlockChance
-
verticalRange
The vertical distance a column searches for an available position, between 1 and 256.- Returns:
- the vertical range
- Since:
- 3.0.1
-
vegetationChance
The chance of placing thevegetationFeature()on a found position, between 0.0 and 1.0.- Returns:
- the vegetation chance
- Since:
- 3.0.1
-
xzRadius
The XZ radius searched for available positions. The x and z radii are sampled independently from this provider.- Returns:
- the xz radius
- Since:
- 3.0.1
-
extraEdgeColumnChance
The chance to add a search position adjacent to the initial rectangle, between 0.0 and 1.0.- Returns:
- the extra edge column chance
- Since:
- 3.0.1
-
toBuilder
Converts this object back to a builder.- Returns:
- a new builder with the same values as this object
- Since:
- 3.0.1
-
of
@AsOf("3.0.1") static VegetationPatchConfiguration of(TagSet<Material> replaceable, BlockStateProvider groundState, PlacedFeature vegetationFeature, CaveSurface surface, IntProvider depth, float extraBottomBlockChance, int verticalRange, float vegetationChance, IntProvider xzRadius, float extraEdgeColumnChance) Creates a new vegetation patch configuration.- Parameters:
replaceable- the blocks that the patch is allowed to replacegroundState- the block used to build the patchvegetationFeature- the placed feature to place on top of each found positionsurface- which surface to search from and place againstdepth- the number of blocks the patch replaces per columnextraBottomBlockChance- the chance to add one extra block to the depth of a columnverticalRange- the vertical distance a column searches for an available positionvegetationChance- the chance of placing the vegetation feature on a found positionxzRadius- the XZ radius searched for available positionsextraEdgeColumnChance- the chance to add a search position adjacent to the initial rectangle- Returns:
- a new vegetation patch configuration
- Since:
- 3.0.1
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.1
-