Class TreeGrower
java.lang.Object
net.minecraft.world.level.block.grower.TreeGrower
-
Field Summary
Modifier 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
ConstructorDescriptionTreeGrower
(String p_310538_, float p_312608_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_311356_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309855_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_312520_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310394_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309623_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310708_) TreeGrower
(String p_311110_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309803_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_311829_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310077_) -
Method Summary
Modifier and TypeMethodDescriptionprivate ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredFeature
(RandomSource p_312729_, boolean p_311061_) private ResourceKey
<ConfiguredFeature<?, ?>> getConfiguredMegaFeature
(RandomSource p_309400_) boolean
growTree
(ServerLevel p_309830_, ChunkGenerator p_311976_, BlockPos p_310327_, BlockState p_312382_, RandomSource p_309951_) private boolean
hasFlowers
(LevelAccessor p_312531_, BlockPos p_312326_) private static boolean
isTwoByTwoSapling
(BlockState p_310256_, BlockGetter p_311754_, BlockPos p_312442_, int p_310725_, int p_310118_)
-
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 p_311110_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309803_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_311829_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310077_) -
TreeGrower
public TreeGrower(String p_310538_, float p_312608_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_311356_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309855_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_312520_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310394_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_309623_, Optional<ResourceKey<ConfiguredFeature<?, ?>>> p_310708_)
-
-
Method Details
-
getConfiguredFeature
@Nullable private ResourceKey<ConfiguredFeature<?,?>> getConfiguredFeature(RandomSource p_312729_, boolean p_311061_) -
getConfiguredMegaFeature
@Nullable private ResourceKey<ConfiguredFeature<?,?>> getConfiguredMegaFeature(RandomSource p_309400_) -
growTree
public boolean growTree(ServerLevel p_309830_, ChunkGenerator p_311976_, BlockPos p_310327_, BlockState p_312382_, RandomSource p_309951_) -
isTwoByTwoSapling
private static boolean isTwoByTwoSapling(BlockState p_310256_, BlockGetter p_311754_, BlockPos p_312442_, int p_310725_, int p_310118_) -
hasFlowers
-