Class BlobFoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer
- Direct Known Subclasses:
BushFoliagePlacer
,FancyFoliagePlacer
-
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
<BlobFoliagePlacer> protected final int
Fields inherited from class net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
offset, radius
-
Constructor Summary
ConstructorsConstructorDescriptionBlobFoliagePlacer
(IntProvider p_161356_, IntProvider p_161357_, int p_161358_) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <P extends BlobFoliagePlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>, IntProvider, IntProvider, Integer> blobParts
(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_68414_) protected 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
protected final int height
-
-
Constructor Details
-
BlobFoliagePlacer
-
-
Method Details
-
blobParts
protected static <P extends BlobFoliagePlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,IntProvider, blobPartsIntProvider, Integer> (com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_68414_) -
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
-