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 IntProviderprivate final IntProviderprivate final floatFields 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 voidplaceBranch(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 booleanvalidTreePos(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:
typein classTrunkPlacer
-
placeTrunk
public List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader level, BiConsumer<BlockPos, BlockState> blockSetter, RandomSource random, int freeTreeHeight, BlockPos pos, TreeConfiguration config) - Specified by:
placeTrunkin 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:
validTreePosin classTrunkPlacer
-