public class BlobFoliagePlacer extends FoliagePlacer
FoliagePlacer.TreeNode
Modifier and Type | Field and Description |
---|---|
static com.mojang.serialization.Codec<BlobFoliagePlacer> |
CODEC |
protected int |
height |
offset, radius, TYPE_CODEC
Constructor and Description |
---|
BlobFoliagePlacer(UniformIntDistribution radius,
UniformIntDistribution offset,
int height) |
Modifier and Type | Method and Description |
---|---|
protected void |
generate(ModifiableTestableWorld world,
Random random,
TreeFeatureConfig config,
int trunkHeight,
FoliagePlacer.TreeNode treeNode,
int foliageHeight,
int radius,
Set<BlockPos> leaves,
int offset,
BlockBox box)
This is the main method used to generate foliage.
|
int |
getRandomHeight(Random random,
int trunkHeight,
TreeFeatureConfig config) |
protected FoliagePlacerType<?> |
getType() |
protected boolean |
isInvalidForLeaves(Random random,
int baseHeight,
int dx,
int dy,
int dz,
boolean giantTrunk) |
protected static <P extends BlobFoliagePlacer> |
method_28838(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance) |
fillFoliagePlacerFields, generate, generate, getRandomRadius, method_27387
public static final com.mojang.serialization.Codec<BlobFoliagePlacer> CODEC
protected final int height
public BlobFoliagePlacer(UniformIntDistribution radius, UniformIntDistribution offset, int height)
protected static <P extends BlobFoliagePlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,UniformIntDistribution,UniformIntDistribution,Integer> method_28838(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)
protected FoliagePlacerType<?> getType()
getType
in class FoliagePlacer
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, FoliagePlacer.TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int offset, BlockBox box)
generate
in class FoliagePlacer
public int getRandomHeight(Random random, int trunkHeight, TreeFeatureConfig config)
getRandomHeight
in class FoliagePlacer
protected boolean isInvalidForLeaves(Random random, int baseHeight, int dx, int dy, int dz, boolean giantTrunk)
isInvalidForLeaves
in class FoliagePlacer