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.chunk.ChunkGenerator;
import net.minecraft.world.level.LevelAccessor;
import com.mojang.serialization.Codec;
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 Codec<FrequencyDecoratorConfiguration> codec) {
        super(codec);
    }
    
    @Override
    public Stream<BlockPos> getPositions(final LevelAccessor bqc, final ChunkGenerator cha, final Random random, final FrequencyDecoratorConfiguration csf, final BlockPos fu) {
        final int integer7 = bqc.getSeaLevel() / 2 + 1;
        final int integer8;
        final int integer9;
        final int n;
        final int integer10;
        return IntStream.range(0, csf.count).<BlockPos>mapToObj(integer4 -> {
            integer8 = random.nextInt(16) + fu.getX();
            integer9 = random.nextInt(16) + fu.getZ();
            integer10 = n - 5 + random.nextInt(10);
            return new BlockPos(integer8, integer10, integer9);
        });
    }
}
