Class FoliagePlacer
- java.lang.Object
-
- net.minecraft.world.gen.foliageplacer.FoliagePlacer
-
- Direct Known Subclasses:
AcaciaFoliagePlacer
,BlobFoliagePlacer
,DarkOakFoliagePlacer
,JungleFoliagePlacer
,MegaPineFoliagePlacer
,PineFoliagePlacer
,SpruceFoliagePlacer
public abstract class FoliagePlacer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FoliagePlacer.Foliage
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<FoliagePlacer>
CODEC
protected FeatureSpread
offset
protected FeatureSpread
radius
-
Constructor Summary
Constructors Constructor Description FoliagePlacer(FeatureSpread p_i241999_1_, FeatureSpread p_i241999_2_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
createFoliage(IWorldGenerationReader p_230372_1_, java.util.Random p_230372_2_, BaseTreeFeatureConfig p_230372_3_, int p_230372_4_, FoliagePlacer.Foliage p_230372_5_, int p_230372_6_, int p_230372_7_, java.util.Set<BlockPos> p_230372_8_, int p_230372_9_, MutableBoundingBox p_230372_10_)
void
createFoliage(IWorldGenerationReader p_236752_1_, java.util.Random p_236752_2_, BaseTreeFeatureConfig p_236752_3_, int p_236752_4_, FoliagePlacer.Foliage p_236752_5_, int p_236752_6_, int p_236752_7_, java.util.Set<BlockPos> p_236752_8_, MutableBoundingBox p_236752_9_)
abstract int
foliageHeight(java.util.Random p_230374_1_, int p_230374_2_, BaseTreeFeatureConfig p_230374_3_)
protected static <P extends FoliagePlacer>
com.mojang.datafixers.Products.P2<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,FeatureSpread,FeatureSpread>foliagePlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_242830_0_)
int
foliageRadius(java.util.Random p_230376_1_, int p_230376_2_)
private int
offset(java.util.Random p_236755_1_)
protected void
placeLeavesRow(IWorldGenerationReader p_236753_1_, java.util.Random p_236753_2_, BaseTreeFeatureConfig p_236753_3_, BlockPos p_236753_4_, int p_236753_5_, java.util.Set<BlockPos> p_236753_6_, int p_236753_7_, boolean p_236753_8_, MutableBoundingBox p_236753_9_)
protected abstract boolean
shouldSkipLocation(java.util.Random p_230373_1_, int p_230373_2_, int p_230373_3_, int p_230373_4_, int p_230373_5_, boolean p_230373_6_)
protected boolean
shouldSkipLocationSigned(java.util.Random p_230375_1_, int p_230375_2_, int p_230375_3_, int p_230375_4_, int p_230375_5_, boolean p_230375_6_)
protected abstract FoliagePlacerType<?>
type()
-
-
-
Field Detail
-
CODEC
public static final com.mojang.serialization.Codec<FoliagePlacer> CODEC
-
radius
protected final FeatureSpread radius
-
offset
protected final FeatureSpread offset
-
-
Constructor Detail
-
FoliagePlacer
public FoliagePlacer(FeatureSpread p_i241999_1_, FeatureSpread p_i241999_2_)
-
-
Method Detail
-
foliagePlacerParts
protected static <P extends FoliagePlacer> com.mojang.datafixers.Products.P2<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,FeatureSpread,FeatureSpread> foliagePlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_242830_0_)
-
type
protected abstract FoliagePlacerType<?> type()
-
createFoliage
public void createFoliage(IWorldGenerationReader p_236752_1_, java.util.Random p_236752_2_, BaseTreeFeatureConfig p_236752_3_, int p_236752_4_, FoliagePlacer.Foliage p_236752_5_, int p_236752_6_, int p_236752_7_, java.util.Set<BlockPos> p_236752_8_, MutableBoundingBox p_236752_9_)
-
createFoliage
protected abstract void createFoliage(IWorldGenerationReader p_230372_1_, java.util.Random p_230372_2_, BaseTreeFeatureConfig p_230372_3_, int p_230372_4_, FoliagePlacer.Foliage p_230372_5_, int p_230372_6_, int p_230372_7_, java.util.Set<BlockPos> p_230372_8_, int p_230372_9_, MutableBoundingBox p_230372_10_)
-
foliageHeight
public abstract int foliageHeight(java.util.Random p_230374_1_, int p_230374_2_, BaseTreeFeatureConfig p_230374_3_)
-
foliageRadius
public int foliageRadius(java.util.Random p_230376_1_, int p_230376_2_)
-
offset
private int offset(java.util.Random p_236755_1_)
-
shouldSkipLocation
protected abstract boolean shouldSkipLocation(java.util.Random p_230373_1_, int p_230373_2_, int p_230373_3_, int p_230373_4_, int p_230373_5_, boolean p_230373_6_)
-
shouldSkipLocationSigned
protected boolean shouldSkipLocationSigned(java.util.Random p_230375_1_, int p_230375_2_, int p_230375_3_, int p_230375_4_, int p_230375_5_, boolean p_230375_6_)
-
placeLeavesRow
protected void placeLeavesRow(IWorldGenerationReader p_236753_1_, java.util.Random p_236753_2_, BaseTreeFeatureConfig p_236753_3_, BlockPos p_236753_4_, int p_236753_5_, java.util.Set<BlockPos> p_236753_6_, int p_236753_7_, boolean p_236753_8_, MutableBoundingBox p_236753_9_)
-
-