net.minecraft.world.gen.trunk

public abstract class TrunkPlacer

net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
net.minecraft.class_5141
net.minecraft.world.gen.trunk.TrunkPlacer

Field summary

Modifier and TypeField
public static final com.mojang.serialization.Codec<TrunkPlacer>
CODEC
field_24972
TYPE_CODEC
private static final int
MAX_BASE_HEIGHT
field_31528
MAX_BASE_HEIGHT
private static final int
MAX_RAND
field_31529
MAX_RANDOM_HEIGHT
public static final int
MAX_HEIGHT
field_31530
field_31530
protected final int
baseHeight
field_23760
baseHeight
protected final int
heightRandA
field_23761
firstRandomHeight
protected final int
heightRandB
field_23762
secondRandomHeight

Constructor summary

ModifierConstructor
public (int baseHeight, int firstRandomHeight, int secondRandomHeight)

Method summary

Modifier and TypeMethod
protected static <P extends TrunkPlacer> com.mojang.datafixers.Products$P3<com.mojang.serialization.codecs.RecordCodecBuilder$Mu<P>, Integer, Integer, Integer>
trunkPlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder$Instance<P> instance)
method_28904(com.mojang.serialization.codecs.RecordCodecBuilder$Instance<P> arg0)
fillTrunkPlacerFields(com.mojang.serialization.codecs.RecordCodecBuilder$Instance<P> instance)
protected abstract TrunkPlacerType<?>
type()
method_28903()
getType()
public abstract List<FoliagePlacer$TreeNode>
placeTrunk(WorldGenLevel level, BiConsumer<BlockPos, BlockState> trunkSetter, RandomSource random, int treeHeight, BlockPos origin, TreeFeature tree)
method_26991(class_5281 arg0, BiConsumer<class_2338, class_2680> arg1, class_5819 arg2, int arg3, class_2338 arg4, class_2944 arg5)
generate(StructureWorldAccess world, BiConsumer<BlockPos, BlockState> replacer, Random random, int topPosition, BlockPos pos, TreeFeature feature)
public int
getBaseHeight()
method_1_2564()
getBaseHeight()
public int
getTreeHeight(RandomSource random)
method_26993(class_5819 arg0)
getHeight(Random random)
protected static void
placeBelowTrunkBlock(WorldGenLevel level, BiConsumer<BlockPos, BlockState> trunkSetter, RandomSource random, BlockPos pos, TreeFeature tree)
method_27400(class_5281 arg0, BiConsumer<class_2338, class_2680> arg1, class_5819 arg2, class_2338 arg3, class_2944 arg4)
setToDirt(StructureWorldAccess world, BiConsumer<BlockPos, BlockState> replacer, Random random, BlockPos pos, TreeFeature feature)
protected boolean
placeLog(WorldGenLevel level, BiConsumer<BlockPos, BlockState> trunkSetter, RandomSource random, BlockPos pos, TreeFeature tree)
method_35375(class_5281 arg0, BiConsumer<class_2338, class_2680> arg1, class_5819 arg2, class_2338 arg3, class_2944 arg4)
getAndSetState(StructureWorldAccess world, BiConsumer<BlockPos, BlockState> replacer, Random random, BlockPos pos, TreeFeature feature)
protected boolean
placeLog(WorldGenLevel level, BiConsumer<BlockPos, BlockState> trunkSetter, RandomSource random, BlockPos pos, TreeFeature tree, Function<BlockState, BlockState> stateModifier)
method_27402(class_5281 arg0, BiConsumer<class_2338, class_2680> arg1, class_5819 arg2, class_2338 arg3, class_2944 arg4, Function<class_2680, class_2680> arg5)
getAndSetState(StructureWorldAccess world, BiConsumer<BlockPos, BlockState> replacer, Random random, BlockPos pos, TreeFeature feature, Function<BlockState, BlockState> mapper)
protected void
placeLogIfFree(WorldGenLevel level, BiConsumer<BlockPos, BlockState> trunkSetter, RandomSource random, BlockPos$MutableBlockPos pos, TreeFeature tree)
method_27401(class_5281 arg0, BiConsumer<class_2338, class_2680> arg1, class_5819 arg2, class_2338$class_2339 arg3, class_2944 arg4)
trySetState(StructureWorldAccess world, BiConsumer<BlockPos, BlockState> replacer, Random random, BlockPos$Mutable pos, TreeFeature feature)
protected boolean
validTreePos(WorldGenLevel level, BlockPos pos)
method_43196(class_5281 arg0, class_2338 arg1)
canReplace(StructureWorldAccess world, BlockPos pos)
public boolean
isFree(WorldGenLevel level, BlockPos pos)
method_43198(class_5281 arg0, class_2338 arg1)
canReplaceOrIsLog(StructureWorldAccess world, BlockPos pos)
private static boolean
lambda$isFree$0(BlockState arg0)
method_43197(class_2680 arg0)
method_43197(BlockState state)
private static Integer
lambda$trunkPlacerParts$2(TrunkPlacer arg0)
method_28905(class_5141 arg0)
method_28905(TrunkPlacer placer)
private static Integer
lambda$trunkPlacerParts$1(TrunkPlacer arg0)
method_28906(class_5141 arg0)
method_28906(TrunkPlacer placer)
private static Integer
lambda$trunkPlacerParts$0(TrunkPlacer arg0)
method_28907(class_5141 arg0)
method_28907(TrunkPlacer placer)