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

import net.minecraft.world.level.levelgen.feature.configurations.DecoratorConfiguration;
import java.util.List;
import com.google.common.collect.Lists;
import java.util.stream.Stream;
import net.minecraft.core.BlockPos;
import java.util.Random;
import com.mojang.serialization.Codec;
import net.minecraft.world.level.levelgen.placement.FrequencyDecoratorConfiguration;
import net.minecraft.world.level.levelgen.placement.SimpleFeatureDecorator;

public class FireDecorator extends SimpleFeatureDecorator<FrequencyDecoratorConfiguration> {
    public FireDecorator(final Codec<FrequencyDecoratorConfiguration> codec) {
        super(codec);
    }
    
    public Stream<BlockPos> place(final Random random, final FrequencyDecoratorConfiguration csf, final BlockPos fu) {
        final List<BlockPos> list5 = Lists.newArrayList();
        for (int integer6 = 0; integer6 < random.nextInt(random.nextInt(csf.count) + 1) + 1; ++integer6) {
            final int integer7 = random.nextInt(16) + fu.getX();
            final int integer8 = random.nextInt(16) + fu.getZ();
            final int integer9 = random.nextInt(120) + 4;
            list5.add(new BlockPos(integer7, integer9, integer8));
        }
        return list5.stream();
    }
}
