net.minecraft.world.gen.foliage

public class PoplarFoliagePlacer

extends FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.PoplarFoliagePlacer
net.minecraft.class_1_1147
net.minecraft.world.gen.foliage.PoplarFoliagePlacer

Field summary

Modifier and TypeField
public static final com.mojang.serialization.MapCodec<PoplarFoliagePlacer>
CODEC
field_1_7926
CODEC
private final Function<Integer, Integer>
topFoliageLayer
field_1_7932
ONE_LOWER
private final Function<Integer, Integer>
secondTopFoliageLayer
field_1_7930
TWO_LOWER
private final IntProvider
height
field_1_7929
height
private final float
sideHoleChance
field_1_7931
sideHoleChance
private boolean
flipRhombusShape
field_1_7927
stashedGiantTrunk
private int
foliageHeight
field_1_7928
stashedFoliageHeight

Constructor summary

ModifierConstructor
public (IntProvider radius, IntProvider offset, IntProvider height, float sideHoleChance)

Method summary

Modifier and TypeMethod
protected FoliagePlacerType<?>
type()
method_28843()
getType()
protected void
createFoliage(WorldGenLevel level, FoliagePlacer$FoliageSetter foliageSetter, RandomSource random, TreeFeature tree, int treeHeight, FoliagePlacer$FoliageAttachment foliageAttachment, int foliageHeight, int leafRadius, int offset)
method_23448(class_5281 arg0, class_4647$class_8179 arg1, class_5819 arg2, class_2944 arg3, int arg4, class_4647$class_5208 arg5, int arg6, int arg7, int arg8)
generate(StructureWorldAccess arg0, FoliagePlacer$BlockPlacer arg1, Random arg2, TreeFeature arg3, int arg4, FoliagePlacer$TreeNode arg5, int arg6, int arg7, int arg8)
private void
replaceLeavesWithLog(WorldGenLevel level, FoliagePlacer$FoliageSetter foliageSetter, TreeFeature tree, RandomSource random, BlockPos origin, int currentRadius, int y, boolean doubleTrunk)
method_1_7248(class_5281 arg0, class_4647$class_8179 arg1, class_2944 arg2, class_5819 arg3, class_2338 arg4, int arg5, int arg6, boolean arg7)
generateSquareWithSideHoles(StructureWorldAccess world, FoliagePlacer$BlockPlacer placer, TreeFeature feature, Random random, BlockPos pos, int radius, int y, boolean giantTrunk)
private static void
tryPlaceLog(WorldGenLevel level, FoliagePlacer$FoliageSetter foliageSetter, RandomSource random, TreeFeature tree, BlockPos pos, Function<BlockState, BlockState> stateModifier)
method_1_7250(class_5281 arg0, class_4647$class_8179 arg1, class_5819 arg2, class_2944 arg3, class_2338 arg4, Function<class_2680, class_2680> arg5)
replaceFoliageWithTrunk(StructureWorldAccess world, FoliagePlacer$BlockPlacer placer, Random random, TreeFeature feature, BlockPos pos, Function<BlockState, BlockState> trunkTransformer)
private static Function<BlockState, BlockState>
getSidewaysStateModifier(Direction branchDirection)
method_1_7237(class_2350 arg0)
axisSetter(Direction direction)
public int
foliageHeight(RandomSource random, int treeHeight, TreeFeature tree)
method_26989(class_5819 arg0, int arg1, class_2944 arg2)
getRandomHeight(Random arg0, int arg1, TreeFeature arg2)
protected boolean
shouldSkipLocationSigned(RandomSource random, int dx, int y, int dz, int currentRadius, boolean doubleTrunk)
method_27387(class_5819 arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5)
isPositionInvalid(Random arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5)
protected boolean
shouldSkipLocation(RandomSource random, int dx, int y, int dz, int currentRadius, boolean doubleTrunk)
method_23451(class_5819 arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5)
isInvalidForLeaves(Random arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5)
private int
getCornerBlocksToCutForRhombusShape(int dx, int dz, int currentRadius, boolean shouldRowBePartialRhombusShape)
method_1_7236(int arg0, int arg1, int arg2, boolean arg3)
getLeavesMargin(int dx, int dz, int radius, boolean centralY)
private static boolean
isWithinRhombusShape(int currentRadius, int absDx, int absDz, int cornerBlocksToCutForRhombusShape, int additionalSideRemoval)
method_1_7240(int arg0, int arg1, int arg2, int arg3, int arg4)
isWithinRangeForLeaves(int radius, int absdx, int absdz, int leavesMargin, int sideHoleAdjustment)
private static boolean
isLeftLowerCornerOrRightTopCorner(int dx, int dz)
method_1_7238(int arg0, int arg1)
haveOppositeSigns(int dx, int dz)
private static boolean
isLeftTopCornerOrRightLowerCorner(int dx, int dz)
method_1_7239(int arg0, int arg1)
haveSameSign(int dx, int dz)
private boolean
shouldRowBePartialRhombusShape(int y)
method_1_7249(int arg0)
isCentralY(int y)
private static BlockState
lambda$getSidewaysStateModifier$0(Direction arg0, BlockState arg1)
method_1_7241(class_2350 arg0, class_2680 arg1)
method_1_7241(Direction arg0, BlockState state)
private static boolean
lambda$tryPlaceLog$0(TreeFeature arg0, WorldGenLevel arg1, RandomSource arg2, BlockPos arg3, BlockState arg4)
method_1_7247(class_2944 arg0, class_5281 arg1, class_5819 arg2, class_2338 arg3, class_2680 arg4)
method_1_7247(TreeFeature arg0, StructureWorldAccess arg1, Random arg2, BlockPos arg3, BlockState state)
private static Integer
lambda$new$1(Integer arg0)
method_1_7243(Integer arg0)
method_1_7243(Integer y)
private static Integer
lambda$new$0(Integer arg0)
method_1_7242(Integer arg0)
method_1_7242(Integer y)
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_1_7244(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_1_7244(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)
private static Float
lambda$static$2(PoplarFoliagePlacer arg0)
method_1_7246(class_1_1147 arg0)
method_1_7246(PoplarFoliagePlacer placer)
private static IntProvider
lambda$static$1(PoplarFoliagePlacer arg0)
method_1_7245(class_1_1147 arg0)
method_1_7245(PoplarFoliagePlacer placer)