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 pBaseHeight, int pHeightRandA, int pHeightRandB, IntProvider pExtraBranchSteps, float pPlaceBranchPerLogProbability, IntProvider pExtraBranchLength, HolderSet<Block> pCanGrowThrough) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
placeBranch
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, TreeConfiguration pTreeConfig, List<FoliagePlacer.FoliageAttachment> pFoliageAttachments, BlockPos.MutableBlockPos pPos, int pY, Direction pDirection, int pExtraBranchLength, int pExtraBranchSteps) 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 boolean
validTreePos
(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 pBaseHeight, int pHeightRandA, int pHeightRandB, IntProvider pExtraBranchSteps, float pPlaceBranchPerLogProbability, IntProvider pExtraBranchLength, HolderSet<Block> pCanGrowThrough)
-
-
Method Details
-
type
- Specified by:
type
in 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:
placeTrunk
in classTrunkPlacer
-
placeBranch
private void placeBranch(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, TreeConfiguration pTreeConfig, List<FoliagePlacer.FoliageAttachment> pFoliageAttachments, BlockPos.MutableBlockPos pPos, int pY, Direction pDirection, int pExtraBranchLength, int pExtraBranchSteps) -
validTreePos
- Overrides:
validTreePos
in classTrunkPlacer
-