Class TrunkPlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
- Direct Known Subclasses:
BendingTrunkPlacer,DarkOakTrunkPlacer,FancyTrunkPlacer,ForkingTrunkPlacer,GiantTrunkPlacer,StraightTrunkPlacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intstatic com.mojang.serialization.Codec<TrunkPlacer>protected intprotected intprivate static intstatic intprivate static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetTreeHeight(Random p_70310_)private static booleanisDirt(LevelSimulatedReader p_70296_, BlockPos p_70297_)protected static booleanplaceLog(LevelSimulatedReader p_161894_, BiConsumer<BlockPos,BlockState> p_161895_, Random p_161896_, BlockPos p_161897_, TreeConfiguration p_161898_)protected static booleanplaceLog(LevelSimulatedReader p_161887_, BiConsumer<BlockPos,BlockState> p_161888_, Random p_161889_, BlockPos p_161890_, TreeConfiguration p_161891_, Function<BlockState,BlockState> p_161892_)protected static voidplaceLogIfFree(LevelSimulatedReader p_161875_, BiConsumer<BlockPos,BlockState> p_161876_, Random p_161877_, BlockPos.MutableBlockPos p_161878_, TreeConfiguration p_161879_)abstract List<FoliagePlacer.FoliageAttachment>placeTrunk(LevelSimulatedReader p_161868_, BiConsumer<BlockPos,BlockState> p_161869_, Random p_161870_, int p_161871_, BlockPos p_161872_, TreeConfiguration p_161873_)protected static voidsetDirtAt(LevelSimulatedReader p_161881_, BiConsumer<BlockPos,BlockState> p_161882_, Random p_161883_, BlockPos p_161884_, TreeConfiguration p_161885_)protected static <P extends TrunkPlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer>trunkPlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_70306_)protected abstract TrunkPlacerType<?>type()
-
Field Details
-
CODEC
-
MAX_BASE_HEIGHT
private static final int MAX_BASE_HEIGHT- See Also:
- Constant Field Values
-
MAX_RAND
private static final int MAX_RAND- See Also:
- Constant Field Values
-
MAX_HEIGHT
public static final int MAX_HEIGHT- See Also:
- Constant Field Values
-
baseHeight
protected final int baseHeight -
heightRandA
protected final int heightRandA -
heightRandB
protected final int heightRandB
-
-
Constructor Details
-
TrunkPlacer
public TrunkPlacer(int p_70268_, int p_70269_, int p_70270_)
-
-
Method Details
-
trunkPlacerParts
protected static <P extends TrunkPlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer> trunkPlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_70306_) -
type
-
placeTrunk
public abstract List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader p_161868_, BiConsumer<BlockPos,BlockState> p_161869_, Random p_161870_, int p_161871_, BlockPos p_161872_, TreeConfiguration p_161873_) -
getTreeHeight
-
isDirt
-
setDirtAt
protected static void setDirtAt(LevelSimulatedReader p_161881_, BiConsumer<BlockPos,BlockState> p_161882_, Random p_161883_, BlockPos p_161884_, TreeConfiguration p_161885_) -
placeLog
protected static boolean placeLog(LevelSimulatedReader p_161894_, BiConsumer<BlockPos,BlockState> p_161895_, Random p_161896_, BlockPos p_161897_, TreeConfiguration p_161898_) -
placeLog
protected static boolean placeLog(LevelSimulatedReader p_161887_, BiConsumer<BlockPos,BlockState> p_161888_, Random p_161889_, BlockPos p_161890_, TreeConfiguration p_161891_, Function<BlockState,BlockState> p_161892_) -
placeLogIfFree
protected static void placeLogIfFree(LevelSimulatedReader p_161875_, BiConsumer<BlockPos,BlockState> p_161876_, Random p_161877_, BlockPos.MutableBlockPos p_161878_, TreeConfiguration p_161879_)
-