Class MegaPineFoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer
-
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
<MegaPineFoliagePlacer> private final IntProvider
Fields inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
offset, radius
-
Constructor Summary
ConstructorsConstructorDescriptionMegaPineFoliagePlacer
(IntProvider radius, IntProvider offset, IntProvider crownHeight) -
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
-
crownHeight
-
-
Constructor Details
-
MegaPineFoliagePlacer
-
-
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
-