net.minecraft.block

public final class SaplingGenerator

net.minecraft.world.level.block.grower.TreeGrower
net.minecraft.class_8813
net.minecraft.block.SaplingGenerator

Field summary

Modifier and TypeField
private static final Map<String, SaplingGenerator>
GROWERS
field_46520
GENERATORS
public static final com.mojang.serialization.Codec<SaplingGenerator>
CODEC
field_46510
CODEC
public static final SaplingGenerator
OAK
field_46511
OAK
public static final SaplingGenerator
SPRUCE
field_46512
SPRUCE
public static final SaplingGenerator
MANGROVE
field_46513
MANGROVE
public static final SaplingGenerator
AZALEA
field_46514
AZALEA
public static final SaplingGenerator
BIRCH
field_46515
BIRCH
public static final SaplingGenerator
JUNGLE
field_46516
JUNGLE
public static final SaplingGenerator
ACACIA
field_46517
ACACIA
public static final SaplingGenerator
CHERRY
field_46518
CHERRY
public static final SaplingGenerator
DARK_OAK
field_46519
DARK_OAK
public static final SaplingGenerator
PALE_OAK
field_54791
PALE_OAK
public static final SaplingGenerator
POPLAR
field_1_7510
POPLAR
private final String
name
field_46521
id
private final WeightedPool<RegistryKey<Feature>>
trees
field_1_7513
smallVariants
private final WeightedPool<RegistryKey<Feature>>
megaTrees
field_46523
largeVariants
private final WeightedPool<RegistryKey<Feature>>
flowerTrees
field_1_7511
floralVariants
private final RegistryKey<Feature>
shortestTreeType
field_1_7512
treeFeatureForTrunkHeight

Constructor summary

ModifierConstructor
public (String id, WeightedPool<RegistryKey<Feature>> smallVariants, WeightedPool<RegistryKey<Feature>> largeVariants, WeightedPool<RegistryKey<Feature>> floralVariants, RegistryKey<Feature> treeFeatureForTrunkHeight)

Method summary

Modifier and TypeMethod
private RegistryKey<Feature>
getConfiguredFeature(RandomSource random, boolean hasFlowers)
method_54087(class_5819 arg0, boolean arg1)
getSmallTreeFeature(Random random, boolean flowersNearby)
private RegistryKey<Feature>
getConfiguredMegaFeature(RandomSource random)
method_54086(class_5819 arg0)
getMegaTreeFeature(Random random)
public boolean
growTree(ServerLevel level, ChunkGenerator generator, BlockPos pos, BlockState state, RandomSource random)
method_54085(class_3218 arg0, class_2794 arg1, class_2338 arg2, class_2680 arg3, class_5819 arg4)
generate(ServerWorld world, ChunkGenerator chunkGenerator, BlockPos pos, BlockState sapling, Random random)
private static List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>>
getSurroundingBlockStates(ServerLevel level, BlockPos pos, int dx, int dz)
method_1_6873(class_3218 arg0, class_2338 arg1, int arg2, int arg3)
getLargeTreeBlocksAndPositions(ServerWorld world, BlockPos pos, int dx, int dz)
private static void
removeSaplings(ServerLevel level, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> saplingBlocks)
method_1_6875(class_3218 arg0, List<com.mojang.datafixers.util.Pair<class_2680, class_2338>> arg1)
clearBlocks(ServerWorld world, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks)
private static void
removeSapling(ServerLevel level, BlockPos saplingPosition)
method_1_6874(class_3218 arg0, class_2338 arg1)
clearBlock(ServerWorld world, BlockPos pos)
private static void
resetSaplings(ServerLevel level, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> saplingBlocks)
method_1_6876(class_3218 arg0, List<com.mojang.datafixers.util.Pair<class_2680, class_2338>> arg1)
setBlocks(ServerWorld world, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> groundLevelSurroundingBlocks)
private static boolean
isTwoByTwoSapling(BlockState state, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> surroundingBlocks)
method_54090(class_2680 arg0, List<com.mojang.datafixers.util.Pair<class_2680, class_2338>> arg1)
canGenerateLargeTree(BlockState sapling, List<com.mojang.datafixers.util.Pair<BlockState, BlockPos>> statesAndPositions)
private boolean
hasFlowers(LevelAccessor level, BlockPos pos)
method_54088(class_1936 arg0, class_2338 arg1)
areFlowersNearby(WorldAccess world, BlockPos pos)
public OptionalInt
getMinimumHeight(ServerLevel level)
method_1_2541(class_3218 arg0)
getBaseTrunkHeight(ServerWorld world)
public boolean
canGrow(ServerLevel level, BlockPos pos, BlockState state)
method_1_6871(class_3218 arg0, class_2338 arg1, class_2680 arg2)
canGrow(ServerWorld world, BlockPos pos, BlockState sapling)
private static Optional<SaplingGenerator$LargeTreeGrowth>
findTwoByTwoSaplingPos(ServerLevel level, BlockState state, BlockPos pos)
method_1_6872(class_3218 arg0, class_2680 arg1, class_2338 arg2)
queryLargeTreeGrowth(ServerWorld world, BlockState sapling, BlockPos pos)
private static String
lambda$static$0(TreeGrower arg0)
method_54089(class_8813 arg0)
method_54089(SaplingGenerator generator)