Class TreeGrower
java.lang.Object
net.minecraft.world.level.block.grower.TreeGrower
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TreeGrower
static final TreeGrower
static final TreeGrower
static final TreeGrower
static final com.mojang.serialization.Codec
<TreeGrower> static final TreeGrower
private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> private static final Map
<String, TreeGrower> static final TreeGrower
static final TreeGrower
private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> private final String
static final TreeGrower
private final float
private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> static final TreeGrower
private final Optional
<ResourceKey<ConfiguredFeature<?, ?>>> -
Constructor Summary
ConstructorsConstructorDescriptionTreeGrower
(String name, float secondaryChance, Optional<ResourceKey<ConfiguredFeature<?, ?>>> megaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> tree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> flowers, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryFlowers) TreeGrower
(String name, Optional<ResourceKey<ConfiguredFeature<?, ?>>> megaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> tree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> flowers) -
Method Summary
Modifier and TypeMethodDescriptionprivate ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredFeature
(RandomSource random, boolean flowers) private ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredMegaFeature
(RandomSource random) boolean
growTree
(ServerLevel level, ChunkGenerator chunkGenerator, BlockPos pos, BlockState state, RandomSource random) private boolean
hasFlowers
(LevelAccessor level, BlockPos pos) private static boolean
isTwoByTwoSapling
(BlockState state, BlockGetter level, BlockPos pos, int xOffset, int yOffset)
-
Field Details
-
GROWERS
-
CODEC
-
OAK
-
SPRUCE
-
MANGROVE
-
AZALEA
-
BIRCH
-
JUNGLE
-
ACACIA
-
CHERRY
-
DARK_OAK
-
name
-
secondaryChance
private final float secondaryChance -
megaTree
-
secondaryMegaTree
-
tree
-
secondaryTree
-
flowers
-
secondaryFlowers
-
-
Constructor Details
-
TreeGrower
public TreeGrower(String name, Optional<ResourceKey<ConfiguredFeature<?, ?>>> megaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> tree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> flowers) -
TreeGrower
public TreeGrower(String name, float secondaryChance, Optional<ResourceKey<ConfiguredFeature<?, ?>>> megaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> tree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> flowers, Optional<ResourceKey<ConfiguredFeature<?, ?>>> secondaryFlowers)
-
-
Method Details
-
getConfiguredFeature
@Nullable private ResourceKey<ConfiguredFeature<?,?>> getConfiguredFeature(RandomSource random, boolean flowers) -
getConfiguredMegaFeature
-
growTree
public boolean growTree(ServerLevel level, ChunkGenerator chunkGenerator, BlockPos pos, BlockState state, RandomSource random) -
isTwoByTwoSapling
private static boolean isTwoByTwoSapling(BlockState state, BlockGetter level, BlockPos pos, int xOffset, int yOffset) -
hasFlowers
-