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 p_272646_, IntProvider p_272802_, IntProvider p_273604_, float p_272737_, float p_273720_, float p_273152_, float p_273529_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createFoliage
(LevelSimulatedReader pLevel, FoliagePlacer.FoliageSetter pBlockSetter, RandomSource pRandom, TreeConfiguration pConfig, int pMaxFreeTreeHeight, FoliagePlacer.FoliageAttachment pAttachment, int pFoliageHeight, int pFoliageRadius, int pOffset) int
foliageHeight
(RandomSource pRandom, int pHeight, TreeConfiguration pConfig) protected boolean
shouldSkipLocation
(RandomSource pRandom, int pLocalX, int pLocalY, int pLocalZ, int pRange, boolean pLarge) 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 p_272646_, IntProvider p_272802_, IntProvider p_273604_, float p_272737_, float p_273720_, float p_273152_, float p_273529_)
-
-
Method Details
-
type
- Specified by:
type
in classFoliagePlacer
-
createFoliage
protected void createFoliage(LevelSimulatedReader pLevel, FoliagePlacer.FoliageSetter pBlockSetter, RandomSource pRandom, TreeConfiguration pConfig, int pMaxFreeTreeHeight, FoliagePlacer.FoliageAttachment pAttachment, int pFoliageHeight, int pFoliageRadius, int pOffset) - Specified by:
createFoliage
in classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeight
in classFoliagePlacer
-
shouldSkipLocation
protected boolean shouldSkipLocation(RandomSource pRandom, int pLocalX, int pLocalY, int pLocalZ, int pRange, boolean pLarge) 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
-