public abstract class FoliagePlacer extends Object implements DynamicSerializable
| Modifier and Type | Class and Description |
|---|---|
static class |
FoliagePlacer.TreeNode
A point on a tree to generate foliage around
|
| Modifier and Type | Field and Description |
|---|---|
private int |
offset |
private int |
radius |
private int |
randomOffset |
private int |
randomRadius |
private FoliagePlacerType<?> |
type |
| Constructor and Description |
|---|
FoliagePlacer(int radius,
int randomRadius,
int offset,
int randomOffset,
FoliagePlacerType<?> type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
BlockPos blockPos,
int baseHeight,
Set<BlockPos> leaves,
int int2,
boolean giantTrunk) |
void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
int trunkHeight,
FoliagePlacer.TreeNode treeNode,
int foliageHeight,
int radius,
Set<BlockPos> leaves) |
protected abstract void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
int trunkHeight,
FoliagePlacer.TreeNode treeNode,
int foliageHeight,
int radius,
Set<BlockPos> leaves,
int int2)
This is the main method used to generate foliage.
|
abstract int |
getHeight(Random random,
int trunkHeight,
TreeFeatureConfig config) |
int |
getRadius(Random random,
int baseHeight) |
protected abstract boolean |
isInvalidForLeaves(Random random,
int baseHeight,
int dx,
int dy,
int dz,
boolean bool) |
private int |
method_27386(Random random) |
protected boolean |
method_27387(Random random,
int int2,
int int3,
int int4,
int int5,
boolean bool) |
<T> T |
serialize(com.mojang.datafixers.types.DynamicOps<T> ops) |
private final int radius
private final int randomRadius
private final int offset
private final int randomOffset
private final FoliagePlacerType<?> type
public FoliagePlacer(int radius,
int randomRadius,
int offset,
int randomOffset,
FoliagePlacerType<?> type)
public void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, FoliagePlacer.TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves)
protected abstract void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, FoliagePlacer.TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int int2)
public abstract int getHeight(Random random, int trunkHeight, TreeFeatureConfig config)
public int getRadius(Random random, int baseHeight)
private int method_27386(Random random)
protected abstract boolean isInvalidForLeaves(Random random, int baseHeight, int dx, int dy, int dz, boolean bool)
protected boolean method_27387(Random random, int int2, int int3, int int4, int int5, boolean bool)
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, BlockPos blockPos, int baseHeight, Set<BlockPos> leaves, int int2, boolean giantTrunk)
public <T> T serialize(com.mojang.datafixers.types.DynamicOps<T> ops)
serialize in interface DynamicSerializable