package net.minecraft.world.level.levelgen.feature;

import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.core.BlockPos;
import java.util.Random;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.StructureFeatureManager;
import net.minecraft.world.level.WorldGenLevel;
import com.mojang.serialization.Codec;
import net.minecraft.world.level.levelgen.feature.configurations.RandomRandomFeatureConfiguration;

public class RandomRandomFeature extends Feature<RandomRandomFeatureConfiguration> {
    public RandomRandomFeature(final Codec<RandomRandomFeatureConfiguration> codec) {
        super(codec);
    }
    
    @Override
    public boolean place(final WorldGenLevel bqu, final StructureFeatureManager bqq, final ChunkGenerator cha, final Random random, final BlockPos fu, final RandomRandomFeatureConfiguration coh) {
        for (int integer8 = random.nextInt(5) - 3 + coh.count, integer9 = 0; integer9 < integer8; ++integer9) {
            final int integer10 = random.nextInt(coh.features.size());
            final ConfiguredFeature<?, ?> ckb11 = coh.features.get(integer10);
            ckb11.place(bqu, bqq, cha, random, fu);
        }
        return true;
    }
}
