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 SummaryFieldsModifier and TypeFieldDescriptionprotected final intstatic final com.mojang.serialization.Codec<TrunkPlacer>protected final intprotected final intprivate static final intstatic final intprivate static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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_HEIGHTprivate static final int MAX_BASE_HEIGHT- See Also:
 
- 
MAX_RANDprivate static final int MAX_RAND- See Also:
 
- 
MAX_HEIGHTpublic static final int MAX_HEIGHT- See Also:
 
- 
baseHeightprotected final int baseHeight
- 
heightRandAprotected final int heightRandA
- 
heightRandBprotected final int heightRandB
 
- 
- 
Constructor Details- 
TrunkPlacerpublic TrunkPlacer(int p_70268_, int p_70269_, int p_70270_) 
 
- 
- 
Method Details- 
trunkPlacerPartsprotected 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
- 
placeTrunkpublic 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
- 
setDirtAtprotected static void setDirtAt(LevelSimulatedReader p_226170_, BiConsumer<BlockPos, BlockState> p_226171_, RandomSource p_226172_, BlockPos p_226173_, TreeConfiguration p_226174_) 
- 
placeLogprotected boolean placeLog(LevelSimulatedReader p_226188_, BiConsumer<BlockPos, BlockState> p_226189_, RandomSource p_226190_, BlockPos p_226191_, TreeConfiguration p_226192_) 
- 
placeLogprotected boolean placeLog(LevelSimulatedReader p_226176_, BiConsumer<BlockPos, BlockState> p_226177_, RandomSource p_226178_, BlockPos p_226179_, TreeConfiguration p_226180_, Function<BlockState, BlockState> p_226181_) 
- 
placeLogIfFreeprotected void placeLogIfFree(LevelSimulatedReader p_226164_, BiConsumer<BlockPos, BlockState> p_226165_, RandomSource p_226166_, BlockPos.MutableBlockPos p_226167_, TreeConfiguration p_226168_) 
- 
validTreePos
- 
isFree
 
-