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 pRadius, IntProvider pOffset, IntProvider pHeight, float pWideBottomLayerHoleChance, float pCornerHoleChance, float pHangingLeavesChance, float pHangingLeavesExtensionChance) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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_) int
foliageHeight
(RandomSource p_273679_, int p_273336_, TreeConfiguration p_273643_) protected boolean
shouldSkipLocation
(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:
type
in 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:
createFoliage
in classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeight
in 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:FoliagePlacer
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
-