Class TreeGrower
java.lang.Object
net.minecraft.world.level.block.grower.TreeGrower
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TreeGrowerstatic final TreeGrowerstatic final TreeGrowerstatic final TreeGrowerstatic final com.mojang.serialization.Codec<TreeGrower> static final TreeGrowerprivate final Optional<ResourceKey<ConfiguredFeature<?, ?>>> private static final Map<String, TreeGrower> static final TreeGrowerstatic final TreeGrowerprivate final Optional<ResourceKey<ConfiguredFeature<?, ?>>> private final Stringstatic final TreeGrowerstatic final TreeGrowerprivate final floatprivate final Optional<ResourceKey<ConfiguredFeature<?, ?>>> private final Optional<ResourceKey<ConfiguredFeature<?, ?>>> private final Optional<ResourceKey<ConfiguredFeature<?, ?>>> static final TreeGrowerprivate 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) booleangrowTree(ServerLevel pLevel, ChunkGenerator pChunkGenerator, BlockPos pPos, BlockState pState, RandomSource pRandom) private booleanhasFlowers(LevelAccessor pLevel, BlockPos pPos) private static booleanisTwoByTwoSapling(BlockState pState, BlockGetter pLevel, BlockPos pPos, int pXOffset, int pYOffset)
-
Field Details
-
GROWERS
-
CODEC
-
OAK
-
SPRUCE
-
MANGROVE
-
AZALEA
-
BIRCH
-
JUNGLE
-
ACACIA
-
CHERRY
-
DARK_OAK
-
PALE_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
-