Class FeatureSavannaTree
java.lang.Object
org.cloudburstmc.server.level.feature.ReplacingWorldFeature
org.cloudburstmc.server.level.feature.tree.FeatureAbstractTree
org.cloudburstmc.server.level.feature.tree.FeatureNormalTree
org.cloudburstmc.server.level.feature.tree.FeatureSavannaTree
- All Implemented Interfaces:
Predicate<org.cloudburstmc.api.block.BlockState>,WorldFeature,BlockFilter
Generates an acacia (savanna) tree.
- Author:
- DaPorkchop_
-
Field Summary
FieldsFields inherited from class org.cloudburstmc.server.level.feature.tree.FeatureAbstractTree
height, leaves, logFields inherited from interface org.cloudburstmc.server.level.generator.standard.misc.filter.BlockFilter
AIR, REPLACEABLE -
Constructor Summary
ConstructorsConstructorDescriptionFeatureSavannaTree(@NonNull IntRange height, @NonNull GenerationTreeSpecies species)FeatureSavannaTree(@NonNull IntRange height, @NonNull BlockSelector wood, @NonNull BlockSelector leaves) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanPlace(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)booleanplace(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.protected voidplaceLeaves(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height, org.cloudburstmc.api.block.BlockState log, org.cloudburstmc.api.block.BlockState leaves)Methods inherited from class org.cloudburstmc.server.level.feature.tree.FeatureNormalTree
finish, placeTrunkMethods inherited from class org.cloudburstmc.server.level.feature.tree.FeatureAbstractTree
chooseHeight, selectLeaves, selectLogMethods inherited from class org.cloudburstmc.server.level.feature.ReplacingWorldFeature
allNeighborsMatch, allNeighborsMatch, replaceGrassWithDirt, test, testOrLiquid, testOrLiquid
-
Field Details
-
DEFAULT_HEIGHT
-
-
Constructor Details
-
FeatureSavannaTree
public FeatureSavannaTree(@NonNull @NonNull IntRange height, @NonNull @NonNull GenerationTreeSpecies species) -
FeatureSavannaTree
public FeatureSavannaTree(@NonNull @NonNull IntRange height, @NonNull @NonNull BlockSelector wood, @NonNull @NonNull BlockSelector leaves)
-
-
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.- Specified by:
placein interfaceWorldFeature- Overrides:
placein classFeatureAbstractTree- 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
-
canPlace
protected boolean canPlace(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)- Overrides:
canPlacein classFeatureNormalTree
-
placeLeaves
protected void placeLeaves(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height, org.cloudburstmc.api.block.BlockState log, org.cloudburstmc.api.block.BlockState leaves)- Overrides:
placeLeavesin classFeatureNormalTree
-