Class FeatureHugeTree
java.lang.Object
org.cloudburstmc.server.level.feature.ReplacingWorldFeature
org.cloudburstmc.server.level.feature.tree.FeatureAbstractTree
org.cloudburstmc.server.level.feature.tree.FeatureHugeTree
- All Implemented Interfaces:
Predicate<org.cloudburstmc.api.block.BlockState>,WorldFeature,BlockFilter
- Direct Known Subclasses:
FeatureDarkOakTree,FeatureHugeJungleTree,FeatureHugeSpruceTree
Common code for all huge (2x2) tree types.
- Author:
- DaPorkchop_
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionFeatureHugeTree(@NonNull IntRange height, @NonNull GenerationTreeSpecies species)FeatureHugeTree(@NonNull IntRange height, BlockSelector log, 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)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 voidplaceCircularLeafLayer(org.cloudburstmc.api.level.ChunkManager level, int x, int y, int z, int radius, org.cloudburstmc.api.block.BlockState block)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, placeLeaves, selectLeaves, selectLogMethods inherited from class org.cloudburstmc.server.level.feature.ReplacingWorldFeature
allNeighborsMatch, allNeighborsMatch, replaceGrassWithDirt, test, testOrLiquid, testOrLiquid
-
Constructor Details
-
FeatureHugeTree
public FeatureHugeTree(@NonNull @NonNull IntRange height, @NonNull @NonNull GenerationTreeSpecies species) -
FeatureHugeTree
-
-
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)- Specified by:
canPlacein 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
-
placeCircularLeafLayer
protected void placeCircularLeafLayer(org.cloudburstmc.api.level.ChunkManager level, int x, int y, int z, int radius, org.cloudburstmc.api.block.BlockState block)
-