Class TrunkPlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
- Direct Known Subclasses:
BendingTrunkPlacer,CherryTrunkPlacer,DarkOakTrunkPlacer,FancyTrunkPlacer,ForkingTrunkPlacer,GiantTrunkPlacer,StraightTrunkPlacer,UpwardsBranchingTrunkPlacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intstatic final com.mojang.serialization.Codec<TrunkPlacer> protected final intprotected final intprivate static final intstatic final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetTreeHeight(RandomSource p_226154_) private static booleanisDirt(LevelSimulatedReader p_70296_, BlockPos p_70297_) booleanisFree(LevelSimulatedReader p_226185_, BlockPos p_226186_) protected booleanplaceLog(LevelSimulatedReader p_226188_, BiConsumer<BlockPos, BlockState> p_226189_, RandomSource p_226190_, BlockPos p_226191_, TreeConfiguration p_226192_) protected booleanplaceLog(LevelSimulatedReader p_226176_, BiConsumer<BlockPos, BlockState> p_226177_, RandomSource p_226178_, BlockPos p_226179_, TreeConfiguration p_226180_, Function<BlockState, BlockState> p_226181_) protected voidplaceLogIfFree(LevelSimulatedReader p_226164_, BiConsumer<BlockPos, BlockState> p_226165_, RandomSource p_226166_, BlockPos.MutableBlockPos p_226167_, TreeConfiguration p_226168_) abstract List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader p_226157_, BiConsumer<BlockPos, BlockState> p_226158_, RandomSource p_226159_, int p_226160_, BlockPos p_226161_, TreeConfiguration p_226162_) protected static voidsetDirtAt(LevelSimulatedReader p_226170_, BiConsumer<BlockPos, BlockState> p_226171_, RandomSource p_226172_, BlockPos p_226173_, TreeConfiguration p_226174_) 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()protected booleanvalidTreePos(LevelSimulatedReader p_226155_, BlockPos p_226156_)
-
Field Details
-
CODEC
-
MAX_BASE_HEIGHT
private static final int MAX_BASE_HEIGHT- See Also:
-
MAX_RAND
private static final int MAX_RAND- See Also:
-
MAX_HEIGHT
public static final int MAX_HEIGHT- See Also:
-
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, trunkPlacerPartsInteger, Integer> (com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_70306_) -
type
-
placeTrunk
public abstract List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader p_226157_, BiConsumer<BlockPos, BlockState> p_226158_, RandomSource p_226159_, int p_226160_, BlockPos p_226161_, TreeConfiguration p_226162_) -
getTreeHeight
-
isDirt
-
setDirtAt
protected static void setDirtAt(LevelSimulatedReader p_226170_, BiConsumer<BlockPos, BlockState> p_226171_, RandomSource p_226172_, BlockPos p_226173_, TreeConfiguration p_226174_) -
placeLog
protected boolean placeLog(LevelSimulatedReader p_226188_, BiConsumer<BlockPos, BlockState> p_226189_, RandomSource p_226190_, BlockPos p_226191_, TreeConfiguration p_226192_) -
placeLog
protected boolean placeLog(LevelSimulatedReader p_226176_, BiConsumer<BlockPos, BlockState> p_226177_, RandomSource p_226178_, BlockPos p_226179_, TreeConfiguration p_226180_, Function<BlockState, BlockState> p_226181_) -
placeLogIfFree
protected void placeLogIfFree(LevelSimulatedReader p_226164_, BiConsumer<BlockPos, BlockState> p_226165_, RandomSource p_226166_, BlockPos.MutableBlockPos p_226167_, TreeConfiguration p_226168_) -
validTreePos
-
isFree
-