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.levelgen.ChunkGeneratorSettings;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.LevelAccessor;
import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.level.levelgen.feature.configurations.RandomRandomFeatureConfiguration;

public class RandomRandomFeature extends Feature<RandomRandomFeatureConfiguration> {
    public RandomRandomFeature(final Function<Dynamic<?>, ? extends RandomRandomFeatureConfiguration> function) {
        super(function);
    }
    
    @Override
    public boolean place(final LevelAccessor bjx, final ChunkGenerator<? extends ChunkGeneratorSettings> caa, final Random random, final BlockPos fk, final RandomRandomFeatureConfiguration chc) {
        for (int integer7 = random.nextInt(5) - 3 + chc.count, integer8 = 0; integer8 < integer7; ++integer8) {
            final int integer9 = random.nextInt(chc.features.size());
            final ConfiguredFeature<?, ?> cdc10 = chc.features.get(integer9);
            cdc10.place(bjx, caa, random, fk);
        }
        return true;
    }
}
