Class FeatureNormalTree
java.lang.Object
org.cloudburstmc.server.level.feature.ReplacingWorldFeature
org.cloudburstmc.server.level.feature.tree.FeatureAbstractTree
org.cloudburstmc.server.level.feature.tree.FeatureNormalTree
- All Implemented Interfaces:
Predicate<org.cloudburstmc.api.block.BlockState>,WorldFeature,BlockFilter
- Direct Known Subclasses:
FeatureJungleTree,FeatureLargeOakTree,FeatureSavannaTree,FeatureSpruceTree,FeatureSwampTree
Generates a normal, vanilla-style 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
ConstructorsConstructorDescriptionFeatureNormalTree(@NonNull IntRange height, @NonNull GenerationTreeSpecies species)FeatureNormalTree(@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)protected voidfinish(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)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)protected voidplaceTrunk(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.FeatureAbstractTree
chooseHeight, place, selectLeaves, selectLogMethods inherited from class org.cloudburstmc.server.level.feature.ReplacingWorldFeature
allNeighborsMatch, allNeighborsMatch, replaceGrassWithDirt, test, testOrLiquid, testOrLiquid
-
Field Details
-
DEFAULT_HEIGHT
-
-
Constructor Details
-
FeatureNormalTree
public FeatureNormalTree(@NonNull @NonNull IntRange height, @NonNull @NonNull GenerationTreeSpecies species) -
FeatureNormalTree
public FeatureNormalTree(@NonNull @NonNull IntRange height, @NonNull @NonNull BlockSelector wood, @NonNull @NonNull BlockSelector leaves)
-
-
Method Details
-
canPlace
protected boolean canPlace(org.cloudburstmc.api.level.ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)- Specified by:
canPlacein classFeatureAbstractTree
-
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)- Specified by:
placeLeavesin classFeatureAbstractTree
-
placeTrunk
protected void placeTrunk(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)- Specified by:
placeTrunkin classFeatureAbstractTree
-
finish
protected void finish(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)- Specified by:
finishin classFeatureAbstractTree
-