Class UpwardsBranchingTrunkPlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
net.minecraft.world.level.levelgen.feature.trunkplacers.UpwardsBranchingTrunkPlacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<UpwardsBranchingTrunkPlacer> private final IntProvider
private final IntProvider
private final float
Fields inherited from class net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
baseHeight, heightRandA, heightRandB, MAX_HEIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionUpwardsBranchingTrunkPlacer
(int baseHeight, int heightRandA, int heightRandB, IntProvider extraBranchSteps, float placeBranchPerLogProbability, IntProvider extraBranchLength, HolderSet<Block> canGrowThrough) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
placeBranch
(LevelSimulatedReader level, BiConsumer<BlockPos, BlockState> blockSetter, RandomSource random, int freeTreeHeight, TreeConfiguration treeConfig, List<FoliagePlacer.FoliageAttachment> foliageAttachments, BlockPos.MutableBlockPos pos, int y, Direction direction, int extraBranchLength, int extraBranchSteps) placeTrunk
(LevelSimulatedReader level, BiConsumer<BlockPos, BlockState> blockSetter, RandomSource random, int freeTreeHeight, BlockPos pos, TreeConfiguration config) protected TrunkPlacerType
<?> type()
protected boolean
validTreePos
(LevelSimulatedReader level, BlockPos pos) Methods inherited from class net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
getTreeHeight, isFree, placeLog, placeLog, placeLogIfFree, setDirtAt, trunkPlacerParts
-
Field Details
-
CODEC
-
extraBranchSteps
-
placeBranchPerLogProbability
private final float placeBranchPerLogProbability -
extraBranchLength
-
canGrowThrough
-
-
Constructor Details
-
UpwardsBranchingTrunkPlacer
public UpwardsBranchingTrunkPlacer(int baseHeight, int heightRandA, int heightRandB, IntProvider extraBranchSteps, float placeBranchPerLogProbability, IntProvider extraBranchLength, HolderSet<Block> canGrowThrough)
-
-
Method Details
-
type
- Specified by:
type
in classTrunkPlacer
-
placeTrunk
public List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader level, BiConsumer<BlockPos, BlockState> blockSetter, RandomSource random, int freeTreeHeight, BlockPos pos, TreeConfiguration config) - Specified by:
placeTrunk
in classTrunkPlacer
-
placeBranch
private void placeBranch(LevelSimulatedReader level, BiConsumer<BlockPos, BlockState> blockSetter, RandomSource random, int freeTreeHeight, TreeConfiguration treeConfig, List<FoliagePlacer.FoliageAttachment> foliageAttachments, BlockPos.MutableBlockPos pos, int y, Direction direction, int extraBranchLength, int extraBranchSteps) -
validTreePos
- Overrides:
validTreePos
in classTrunkPlacer
-