Class PineFoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer
-
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<PineFoliagePlacer> private final IntProviderFields inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
offset, radius -
Constructor Summary
ConstructorsConstructorDescriptionPineFoliagePlacer(IntProvider p_161486_, IntProvider p_161487_, IntProvider p_161488_) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateFoliage(LevelSimulatedReader pLevel, FoliagePlacer.FoliageSetter pBlockSetter, RandomSource pRandom, TreeConfiguration pConfig, int pMaxFreeTreeHeight, FoliagePlacer.FoliageAttachment pAttachment, int pFoliageHeight, int pFoliageRadius, int pOffset) intfoliageHeight(RandomSource pRandom, int pHeight, TreeConfiguration pConfig) intfoliageRadius(RandomSource pRandom, int pRadius) protected booleanshouldSkipLocation(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, placeLeavesRow, placeLeavesRowWithHangingLeavesBelow, shouldSkipLocationSigned, tryPlaceLeaf
-
Field Details
-
CODEC
-
height
-
-
Constructor Details
-
PineFoliagePlacer
-
-
Method Details
-
type
- Specified by:
typein 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:
createFoliagein classFoliagePlacer
-
foliageRadius
- Overrides:
foliageRadiusin classFoliagePlacer
-
foliageHeight
- Specified by:
foliageHeightin 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:
shouldSkipLocationin classFoliagePlacer
-