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 floatprivate final floatprivate final floatprivate final IntProviderprivate final floatFields inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
offset, radius -
Constructor Summary
ConstructorsConstructorDescriptionCherryFoliagePlacer(IntProvider pRadius, IntProvider pOffset, IntProvider pHeight, float pWideBottomLayerHoleChance, float pCornerHoleChance, float pHangingLeavesChance, float pHangingLeavesExtensionChance) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateFoliage(LevelSimulatedReader p_272723_, FoliagePlacer.FoliageSetter p_273410_, RandomSource p_273057_, TreeConfiguration p_273220_, int p_272975_, FoliagePlacer.FoliageAttachment p_273037_, int p_273647_, int p_273700_, int p_273188_) intfoliageHeight(RandomSource p_273679_, int p_273336_, TreeConfiguration p_273643_) protected booleanshouldSkipLocation(RandomSource p_273294_, int p_273380_, int p_272865_, int p_272853_, int p_272631_, boolean p_273432_) 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 pRadius, IntProvider pOffset, IntProvider pHeight, float pWideBottomLayerHoleChance, float pCornerHoleChance, float pHangingLeavesChance, float pHangingLeavesExtensionChance)
-
-
Method Details
-
type
- Specified by:
typein classFoliagePlacer
-
createFoliage
protected void createFoliage(LevelSimulatedReader p_272723_, FoliagePlacer.FoliageSetter p_273410_, RandomSource p_273057_, TreeConfiguration p_273220_, int p_272975_, FoliagePlacer.FoliageAttachment p_273037_, int p_273647_, int p_273700_, int p_273188_) - Specified by:
createFoliagein classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeightin classFoliagePlacer
-
shouldSkipLocation
protected boolean shouldSkipLocation(RandomSource p_273294_, int p_273380_, int p_272865_, int p_272853_, int p_272631_, boolean p_273432_) Description copied from class:FoliagePlacerSkips 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:
shouldSkipLocationin classFoliagePlacer
-