public abstract class FoliagePlacer extends Object
| 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 |
|---|---|
static com.mojang.serialization.Codec<FoliagePlacer> |
CODEC |
protected int |
offset |
protected int |
radius |
protected int |
randomOffset |
protected int |
randomRadius |
| Constructor and Description |
|---|
FoliagePlacer(int radius,
int randomRadius,
int offset,
int randomOffset) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
BlockPos blockPos,
int baseHeight,
Set<BlockPos> set,
int int2,
boolean giantTrunk,
BlockBox blockBox) |
void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
int trunkHeight,
FoliagePlacer.TreeNode treeNode,
int foliageHeight,
int radius,
Set<BlockPos> leaves,
BlockBox blockBox) |
protected abstract void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
int trunkHeight,
FoliagePlacer.TreeNode treeNode,
int foliageHeight,
int radius,
Set<BlockPos> leaves,
int int2,
BlockBox blockBox)
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 FoliagePlacerType<?> |
getType() |
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) |
protected static <P extends FoliagePlacer> |
method_28846(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance) |
public static final com.mojang.serialization.Codec<FoliagePlacer> CODEC
protected final int radius
protected final int randomRadius
protected final int offset
protected final int randomOffset
public FoliagePlacer(int radius,
int randomRadius,
int offset,
int randomOffset)
protected static <P extends FoliagePlacer> com.mojang.datafixers.Products.P4<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer,Integer> method_28846(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)
protected abstract FoliagePlacerType<?> getType()
public void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, FoliagePlacer.TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, BlockBox blockBox)
protected abstract void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, FoliagePlacer.TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int int2, BlockBox blockBox)
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> set, int int2, boolean giantTrunk, BlockBox blockBox)