public abstract class FeatureAbstractTree extends ReplacingWorldFeature
| Modifier and Type | Field and Description |
|---|---|
protected IntRange |
height |
protected BlockSelector |
leaves |
protected BlockSelector |
log |
AIR, REPLACEABLE| Constructor and Description |
|---|
FeatureAbstractTree(@NonNull IntRange height) |
FeatureAbstractTree(@NonNull IntRange height,
BlockSelector log,
BlockSelector leaves) |
FeatureAbstractTree(@NonNull IntRange height,
@NonNull GenerationTreeSpecies species) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
canPlace(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height) |
protected int |
chooseHeight(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z) |
protected abstract void |
finish(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height,
BlockState log,
BlockState leaves) |
boolean |
place(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 abstract void |
placeLeaves(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height,
BlockState log,
BlockState leaves) |
protected abstract void |
placeTrunk(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height,
BlockState log,
BlockState leaves) |
protected BlockState |
selectLeaves(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height) |
protected BlockState |
selectLog(ChunkManager level,
net.daporkchop.lib.random.PRandom random,
int x,
int y,
int z,
int height) |
allNeighborsMatch, allNeighborsMatch, replaceGrassWithDirt, test, testOrLiquid, testOrLiquidprotected final IntRange height
protected final BlockSelector log
protected final BlockSelector leaves
public FeatureAbstractTree(@NonNull
@NonNull IntRange height)
public FeatureAbstractTree(@NonNull
@NonNull IntRange height,
@NonNull
@NonNull GenerationTreeSpecies species)
public FeatureAbstractTree(@NonNull
@NonNull IntRange height,
BlockSelector log,
BlockSelector leaves)
public boolean place(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z)
WorldFeaturelevel - the level to place the feature intorandom - an instance of PRandom for 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 atprotected int chooseHeight(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z)
protected abstract boolean canPlace(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)
protected BlockState selectLog(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)
protected BlockState selectLeaves(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height)
protected abstract void placeLeaves(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height, BlockState log, BlockState leaves)
protected abstract void placeTrunk(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height, BlockState log, BlockState leaves)
protected abstract void finish(ChunkManager level, net.daporkchop.lib.random.PRandom random, int x, int y, int z, int height, BlockState log, BlockState leaves)
Copyright © 2020. All rights reserved.