Class CherryFoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
FoliagePlacer.FoliageAttachment, FoliagePlacer.FoliageSetter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<CherryFoliagePlacer> private final float
private final float
private final float
private final IntProvider
private final float
Fields inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
offset, radius
-
Constructor Summary
ConstructorsConstructorDescriptionCherryFoliagePlacer
(IntProvider radius, IntProvider offset, IntProvider height, float wideBottomLayerHoleChance, float cornerHoleChance, float hangingLeavesChance, float hangingLeavesExtensionChance) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createFoliage
(LevelSimulatedReader level, FoliagePlacer.FoliageSetter blockSetter, RandomSource random, TreeConfiguration config, int maxFreeTreeHeight, FoliagePlacer.FoliageAttachment attachment, int foliageHeight, int foliageRadius, int offset) int
foliageHeight
(RandomSource random, int height, TreeConfiguration config) protected boolean
shouldSkipLocation
(RandomSource random, int localX, int localY, int localZ, int range, boolean large) Skips certain positions based on the provided shape, such as rounding corners randomly.protected FoliagePlacerType
<?> type()
Methods inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
createFoliage, foliagePlacerParts, foliageRadius, placeLeavesRow, placeLeavesRowWithHangingLeavesBelow, shouldSkipLocationSigned, tryPlaceLeaf
-
Field Details
-
CODEC
-
height
-
wideBottomLayerHoleChance
private final float wideBottomLayerHoleChance -
cornerHoleChance
private final float cornerHoleChance -
hangingLeavesChance
private final float hangingLeavesChance -
hangingLeavesExtensionChance
private final float hangingLeavesExtensionChance
-
-
Constructor Details
-
CherryFoliagePlacer
public CherryFoliagePlacer(IntProvider radius, IntProvider offset, IntProvider height, float wideBottomLayerHoleChance, float cornerHoleChance, float hangingLeavesChance, float hangingLeavesExtensionChance)
-
-
Method Details
-
type
- Specified by:
type
in classFoliagePlacer
-
createFoliage
protected void createFoliage(LevelSimulatedReader level, FoliagePlacer.FoliageSetter blockSetter, RandomSource random, TreeConfiguration config, int maxFreeTreeHeight, FoliagePlacer.FoliageAttachment attachment, int foliageHeight, int foliageRadius, int offset) - Specified by:
createFoliage
in classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeight
in classFoliagePlacer
-
shouldSkipLocation
protected boolean shouldSkipLocation(RandomSource random, int localX, int localY, int localZ, int range, boolean large) Skips certain positions based on the provided shape, such as rounding corners randomly. The coordinates are passed in as absolute value, and should be within [0,range
].- Specified by:
shouldSkipLocation
in classFoliagePlacer
-