net.minecraft.block

public final class SaplingGenerator

net.minecraft.world.level.block.grower.TreeGrower
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
GROWERS
field_46520
GENERATORS
public static final com.mojang.serialization.Codec<SaplingGenerator>
CODEC
CODEC
field_46510
CODEC
public static final SaplingGenerator
OAK
OAK
field_46511
OAK
public static final SaplingGenerator
SPRUCE
SPRUCE
field_46512
SPRUCE
public static final SaplingGenerator
MANGROVE
MANGROVE
field_46513
MANGROVE
public static final SaplingGenerator
AZALEA
AZALEA
field_46514
AZALEA
public static final SaplingGenerator
BIRCH
BIRCH
field_46515
BIRCH
public static final SaplingGenerator
JUNGLE
JUNGLE
field_46516
JUNGLE
public static final SaplingGenerator
ACACIA
ACACIA
field_46517
ACACIA
public static final SaplingGenerator
CHERRY
CHERRY
field_46518
CHERRY
public static final SaplingGenerator
DARK_OAK
DARK_OAK
field_46519
DARK_OAK
public static final SaplingGenerator
PALE_OAK
PALE_OAK
field_54791
PALE_OAK
private final String
name
name
field_46521
id
private final float
secondaryChance
secondaryChance
field_46522
rareChance
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
megaTree
megaTree
field_46523
megaVariant
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
secondaryMegaTree
secondaryMegaTree
field_46524
rareMegaVariant
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
tree
tree
field_46525
regularVariant
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
secondaryTree
secondaryTree
field_46526
rareRegularVariant
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
flowers
flowers
field_46527
beesVariant
private final Optional<RegistryKey<ConfiguredFeature<?, ?>>>
secondaryFlowers
secondaryFlowers
field_46528
rareBeesVariant

Constructor summary

ModifierConstructor
public (String id, Optional<RegistryKey<ConfiguredFeature<?, ?>>> megaVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> regularVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> beesVariant)
public (String id, float rareChance, Optional<RegistryKey<ConfiguredFeature<?, ?>>> megaVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> rareMegaVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> regularVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> rareRegularVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> beesVariant, Optional<RegistryKey<ConfiguredFeature<?, ?>>> rareBeesVariant)

Method summary

Modifier and TypeMethod
private RegistryKey<ConfiguredFeature<?, ?>>
getConfiguredFeature(RandomSource random, boolean hasFlowers)
getConfiguredFeature(RandomSource random, boolean hasFlowers)
method_54087(class_5819 arg0, boolean arg1)
getSmallTreeFeature(Random random, boolean flowersNearby)
private RegistryKey<ConfiguredFeature<?, ?>>
getConfiguredMegaFeature(RandomSource random)
getConfiguredMegaFeature(RandomSource random)
method_54086(class_5819 arg0)
getMegaTreeFeature(Random random)
public boolean
growTree(ServerLevel level, ChunkGenerator generator, BlockPos pos, BlockState state, RandomSource random)
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 state, Random random)
private static boolean
isTwoByTwoSapling(BlockState state, BlockGetter level, BlockPos pos, int ox, int oz)
isTwoByTwoSapling(BlockState state, BlockGetter level, BlockPos pos, int ox, int oz)
method_54090(class_2680 arg0, class_1922 arg1, class_2338 arg2, int arg3, int arg4)
canGenerateLargeTree(BlockState state, BlockView world, BlockPos pos, int x, int z)
private boolean
hasFlowers(LevelAccessor level, BlockPos pos)
hasFlowers(LevelAccessor level, BlockPos pos)
method_54088(class_1936 arg0, class_2338 arg1)
areFlowersNearby(WorldAccess world, BlockPos pos)
public OptionalInt
getMinimumHeight(ServerLevel level)
getMinimumHeight(ServerLevel level)
method_1_2541(class_3218 arg0)
getBaseTrunkHeight(ServerWorld world)