Class FoliagePlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer
- Direct Known Subclasses:
AcaciaFoliagePlacer
,BlobFoliagePlacer
,DarkOakFoliagePlacer
,MegaJungleFoliagePlacer
,MegaPineFoliagePlacer
,PineFoliagePlacer
,RandomSpreadFoliagePlacer
,SpruceFoliagePlacer
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<FoliagePlacer>
protected IntProvider
protected IntProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createFoliage(LevelSimulatedReader p_161414_, BiConsumer<BlockPos,BlockState> p_161415_, Random p_161416_, TreeConfiguration p_161417_, int p_161418_, FoliagePlacer.FoliageAttachment p_161419_, int p_161420_, int p_161421_)
protected abstract void
createFoliage(LevelSimulatedReader p_161422_, BiConsumer<BlockPos,BlockState> p_161423_, Random p_161424_, TreeConfiguration p_161425_, int p_161426_, FoliagePlacer.FoliageAttachment p_161427_, int p_161428_, int p_161429_, int p_161430_)
abstract int
foliageHeight(Random p_68568_, int p_68569_, TreeConfiguration p_68570_)
protected static <P extends FoliagePlacer>
com.mojang.datafixers.Products.P2<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,IntProvider,IntProvider>foliagePlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_68574_)
int
foliageRadius(Random p_68560_, int p_68561_)
private int
protected void
placeLeavesRow(LevelSimulatedReader p_161438_, BiConsumer<BlockPos,BlockState> p_161439_, Random p_161440_, TreeConfiguration p_161441_, BlockPos p_161442_, int p_161443_, int p_161444_, boolean p_161445_)
protected abstract boolean
shouldSkipLocation(Random p_68562_, int p_68563_, int p_68564_, int p_68565_, int p_68566_, boolean p_68567_)
protected boolean
shouldSkipLocationSigned(Random p_68575_, int p_68576_, int p_68577_, int p_68578_, int p_68579_, boolean p_68580_)
protected static void
tryPlaceLeaf(LevelSimulatedReader p_161432_, BiConsumer<BlockPos,BlockState> p_161433_, Random p_161434_, TreeConfiguration p_161435_, BlockPos p_161436_)
protected abstract FoliagePlacerType<?>
type()
-
Field Details
-
CODEC
-
radius
-
offset
-
-
Constructor Details
-
FoliagePlacer
-
-
Method Details
-
foliagePlacerParts
protected static <P extends FoliagePlacer> com.mojang.datafixers.Products.P2<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,IntProvider,IntProvider> foliagePlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_68574_) -
type
-
createFoliage
public void createFoliage(LevelSimulatedReader p_161414_, BiConsumer<BlockPos,BlockState> p_161415_, Random p_161416_, TreeConfiguration p_161417_, int p_161418_, FoliagePlacer.FoliageAttachment p_161419_, int p_161420_, int p_161421_) -
createFoliage
protected abstract void createFoliage(LevelSimulatedReader p_161422_, BiConsumer<BlockPos,BlockState> p_161423_, Random p_161424_, TreeConfiguration p_161425_, int p_161426_, FoliagePlacer.FoliageAttachment p_161427_, int p_161428_, int p_161429_, int p_161430_) -
foliageHeight
-
foliageRadius
-
offset
-
shouldSkipLocation
protected abstract boolean shouldSkipLocation(Random p_68562_, int p_68563_, int p_68564_, int p_68565_, int p_68566_, boolean p_68567_) -
shouldSkipLocationSigned
protected boolean shouldSkipLocationSigned(Random p_68575_, int p_68576_, int p_68577_, int p_68578_, int p_68579_, boolean p_68580_) -
placeLeavesRow
protected void placeLeavesRow(LevelSimulatedReader p_161438_, BiConsumer<BlockPos,BlockState> p_161439_, Random p_161440_, TreeConfiguration p_161441_, BlockPos p_161442_, int p_161443_, int p_161444_, boolean p_161445_) -
tryPlaceLeaf
protected static void tryPlaceLeaf(LevelSimulatedReader p_161432_, BiConsumer<BlockPos,BlockState> p_161433_, Random p_161434_, TreeConfiguration p_161435_, BlockPos p_161436_)
-