package net.minecraft.world.level.levelgen.placement.nether;

import net.minecraft.world.level.levelgen.feature.configurations.DecoratorConfiguration;
import java.util.stream.IntStream;
import java.util.stream.Stream;
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.placement.FrequencyDecoratorConfiguration;
import net.minecraft.world.level.levelgen.placement.FeatureDecorator;

public class MagmaDecorator extends FeatureDecorator<FrequencyDecoratorConfiguration> {
    public MagmaDecorator(final Function<Dynamic<?>, ? extends FrequencyDecoratorConfiguration> function) {
        super(function);
    }
    
    @Override
    public Stream<BlockPos> getPositions(final LevelAccessor bjx, final ChunkGenerator<? extends ChunkGeneratorSettings> caa, final Random random, final FrequencyDecoratorConfiguration ckd, final BlockPos fk) {
        final int integer7 = bjx.getSeaLevel() / 2 + 1;
        final int integer8;
        final int integer9;
        final int n;
        final int integer10;
        return IntStream.range(0, ckd.count).<BlockPos>mapToObj(integer4 -> {
            integer8 = random.nextInt(16) + fk.getX();
            integer9 = random.nextInt(16) + fk.getZ();
            integer10 = n - 5 + random.nextInt(10);
            return new BlockPos(integer8, integer10, integer9);
        });
    }
}
