Class FancyTrunkPlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
net.minecraft.world.level.levelgen.feature.trunkplacers.FancyTrunkPlacer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
private static final double
private static final double
static final com.mojang.serialization.MapCodec
<FancyTrunkPlacer> private static final double
Fields inherited from class net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
baseHeight, heightRandA, heightRandB, MAX_HEIGHT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Direction.Axis
getLogAxis
(BlockPos pPos, BlockPos pOtherPos) private int
private void
makeBranches
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pMaxHeight, BlockPos pPos, List<FancyTrunkPlacer.FoliageCoords> pFoliageCoords, TreeConfiguration pConfig) private boolean
makeLimb
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pBasePos, BlockPos pOffsetPos, boolean pModifyWorld, TreeConfiguration pConfig) placeTrunk
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, BlockPos pPos, TreeConfiguration pConfig) private static float
treeShape
(int pHeight, int pCurrentY) private boolean
trimBranches
(int pMaxHeight, int pCurrentHeight) protected TrunkPlacerType
<?> type()
Methods inherited from class net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
getTreeHeight, isFree, placeLog, placeLog, placeLogIfFree, setDirtAt, trunkPlacerParts, validTreePos
-
Field Details
-
CODEC
-
TRUNK_HEIGHT_SCALE
private static final double TRUNK_HEIGHT_SCALE- See Also:
-
CLUSTER_DENSITY_MAGIC
private static final double CLUSTER_DENSITY_MAGIC- See Also:
-
BRANCH_SLOPE
private static final double BRANCH_SLOPE- See Also:
-
BRANCH_LENGTH_MAGIC
private static final double BRANCH_LENGTH_MAGIC- See Also:
-
-
Constructor Details
-
FancyTrunkPlacer
public FancyTrunkPlacer(int p_70094_, int p_70095_, int p_70096_)
-
-
Method Details
-
type
- Specified by:
type
in classTrunkPlacer
-
placeTrunk
public List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, BlockPos pPos, TreeConfiguration pConfig) - Specified by:
placeTrunk
in classTrunkPlacer
-
makeLimb
private boolean makeLimb(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pBasePos, BlockPos pOffsetPos, boolean pModifyWorld, TreeConfiguration pConfig) -
getSteps
-
getLogAxis
-
trimBranches
private boolean trimBranches(int pMaxHeight, int pCurrentHeight) -
makeBranches
private void makeBranches(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pMaxHeight, BlockPos pPos, List<FancyTrunkPlacer.FoliageCoords> pFoliageCoords, TreeConfiguration pConfig) -
treeShape
private static float treeShape(int pHeight, int pCurrentY)
-