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 pName, float pSecondaryChance, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pFlowers, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryFlowers) TreeGrower
(String pName, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pFlowers) -
Method Summary
Modifier and TypeMethodDescriptionprivate ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredFeature
(RandomSource pRandom, boolean pFlowers) private ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredMegaFeature
(RandomSource pRandom) boolean
growTree
(ServerLevel pLevel, ChunkGenerator pChunkGenerator, BlockPos pPos, BlockState pState, RandomSource pRandom) private boolean
hasFlowers
(LevelAccessor pLevel, BlockPos pPos) private static boolean
isTwoByTwoSapling
(BlockState pState, BlockGetter pLevel, BlockPos pPos, int pXOffset, int pYOffset)
-
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 pName, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pFlowers) -
TreeGrower
public TreeGrower(String pName, float pSecondaryChance, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryMegaTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryTree, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pFlowers, Optional<ResourceKey<ConfiguredFeature<?, ?>>> pSecondaryFlowers)
-
-
Method Details
-
getConfiguredFeature
@Nullable private ResourceKey<ConfiguredFeature<?,?>> getConfiguredFeature(RandomSource pRandom, boolean pFlowers) -
getConfiguredMegaFeature
@Nullable private ResourceKey<ConfiguredFeature<?,?>> getConfiguredMegaFeature(RandomSource pRandom) -
growTree
public boolean growTree(ServerLevel pLevel, ChunkGenerator pChunkGenerator, BlockPos pPos, BlockState pState, RandomSource pRandom) -
isTwoByTwoSapling
private static boolean isTwoByTwoSapling(BlockState pState, BlockGetter pLevel, BlockPos pPos, int pXOffset, int pYOffset) -
hasFlowers
-