Class RandomSpreadFoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer
-
Nested Class Summary
Nested classes/interfaces inherited from class FoliagePlacer
FoliagePlacer.FoliageAttachment, FoliagePlacer.FoliageSetter -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MapCodec<RandomSpreadFoliagePlacer> private final IntProviderprivate final intFields inherited from class FoliagePlacer
offset, radius -
Constructor Summary
ConstructorsConstructorDescriptionRandomSpreadFoliagePlacer(IntProvider radius, IntProvider offset, IntProvider foliageHeight, int leafPlacementAttempts) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateFoliage(WorldGenLevel level, FoliagePlacer.FoliageSetter foliageSetter, RandomSource random, TreeConfiguration config, int treeHeight, FoliagePlacer.FoliageAttachment foliageAttachment, int foliageHeight, int leafRadius, int offset) intfoliageHeight(RandomSource random, int treeHeight, TreeConfiguration config) protected booleanshouldSkipLocation(RandomSource random, int dx, int y, int dz, int currentRadius, boolean doubleTrunk) protected FoliagePlacerType<?> type()Methods inherited from class FoliagePlacer
createFoliage, foliagePlacerParts, foliageRadius, placeLeavesRow, placeLeavesRowWithHangingLeavesBelow, shouldSkipLocationSigned, tryPlaceLeaf
-
Field Details
-
CODEC
-
foliageHeight
-
leafPlacementAttempts
private final int leafPlacementAttempts
-
-
Constructor Details
-
RandomSpreadFoliagePlacer
public RandomSpreadFoliagePlacer(IntProvider radius, IntProvider offset, IntProvider foliageHeight, int leafPlacementAttempts)
-
-
Method Details
-
type
- Specified by:
typein classFoliagePlacer
-
createFoliage
protected void createFoliage(WorldGenLevel level, FoliagePlacer.FoliageSetter foliageSetter, RandomSource random, TreeConfiguration config, int treeHeight, FoliagePlacer.FoliageAttachment foliageAttachment, int foliageHeight, int leafRadius, int offset) - Specified by:
createFoliagein classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeightin classFoliagePlacer
-
shouldSkipLocation
protected boolean shouldSkipLocation(RandomSource random, int dx, int y, int dz, int currentRadius, boolean doubleTrunk) - Specified by:
shouldSkipLocationin classFoliagePlacer
-