package net.minecraft.world.level.block.grower;

import net.minecraft.world.level.levelgen.feature.configurations.MegaTreeConfiguration;
import javax.annotation.Nullable;
import net.minecraft.world.level.biome.BiomeDefaultFeatures;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.SmallTreeConfiguration;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import java.util.Random;

public class SpruceTreeGrower extends AbstractMegaTreeGrower {
    @Nullable
    @Override
    protected ConfiguredFeature<SmallTreeConfiguration, ?> getConfiguredFeature(final Random random, final boolean boolean2) {
        return Feature.NORMAL_TREE.configured(BiomeDefaultFeatures.SPRUCE_TREE_CONFIG);
    }
    
    @Nullable
    @Override
    protected ConfiguredFeature<MegaTreeConfiguration, ?> getConfiguredMegaFeature(final Random random) {
        return Feature.MEGA_SPRUCE_TREE.configured(random.nextBoolean() ? BiomeDefaultFeatures.MEGA_SPRUCE_TREE_CONFIG : BiomeDefaultFeatures.MEGA_PINE_TREE_CONFIG);
    }
}
