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 p_226225_, BiConsumer<BlockPos, BlockState> p_226226_, RandomSource p_226227_, int p_226228_, BlockPos p_226229_, TreeConfiguration p_226230_) protected TrunkPlacerType<?> type()protected booleanvalidTreePos(LevelSimulatedReader p_226210_, BlockPos p_226211_) 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 p_226225_, BiConsumer<BlockPos, BlockState> p_226226_, RandomSource p_226227_, int p_226228_, BlockPos p_226229_, TreeConfiguration p_226230_) - 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
-