Class FeatureChorusTree
java.lang.Object
org.cloudburstmc.server.level.feature.ReplacingWorldFeature
org.cloudburstmc.server.level.feature.FeatureChorusTree
- All Implemented Interfaces:
Predicate<org.cloudburstmc.api.block.BlockState>,WorldFeature,BlockFilter
Generates a fully grown chorus tree.
- Author:
- DaPorkchop_
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IntRangestatic IntRangestatic intstatic intprotected intprotected intFields inherited from interface org.cloudburstmc.server.level.generator.standard.misc.filter.BlockFilter
AIR, REPLACEABLE -
Constructor Summary
ConstructorsConstructorDescriptionFeatureChorusTree(@NonNull IntRange branchHeight, int maxRecursion, int maxOverhang) -
Method Summary
Modifier and TypeMethodDescriptionbooleanplace(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z)Tries to place this feature into the given level at the given position.Methods inherited from class org.cloudburstmc.server.level.feature.ReplacingWorldFeature
allNeighborsMatch, allNeighborsMatch, replaceGrassWithDirt, test, testOrLiquid, testOrLiquid
-
Field Details
-
DEFAULT_BRANCH_HEIGHT
-
DEFAULT_MAX_RECURSION
public static final int DEFAULT_MAX_RECURSION- See Also:
- Constant Field Values
-
DEFAULT_MAX_OVERHANG
public static final int DEFAULT_MAX_OVERHANG- See Also:
- Constant Field Values
-
branchHeight
-
maxRecursion
protected final int maxRecursion -
maxOverhang
protected final int maxOverhang
-
-
Constructor Details
-
FeatureChorusTree
public FeatureChorusTree(@NonNull @NonNull IntRange branchHeight, int maxRecursion, int maxOverhang)
-
-
Method Details
-
place
public boolean place(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z)Description copied from interface:WorldFeatureTries to place this feature into the given level at the given position.- Parameters:
level- the level to place the feature intorandom- an instance ofPRandomfor generating random numbersx- the X coordinate to generate the feature aty- the Y coordinate to generate the feature atz- the Z coordinate to generate the feature at- Returns:
- whether or not the feature could be placed
-