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

import org.apache.logging.log4j.LogManager;
import com.mojang.datafixers.kinds.Applicative;
import com.mojang.datafixers.kinds.App;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.world.level.levelgen.Heightmap;
import org.apache.logging.log4j.Logger;
import com.mojang.serialization.Codec;
import net.minecraft.world.level.levelgen.feature.configurations.DecoratorConfiguration;

public class NoiseCountFactorDecoratorConfiguration implements DecoratorConfiguration {
    public static final Codec<NoiseCountFactorDecoratorConfiguration> CODEC;
    private static final Logger LOGGER;
    public final int noiseToCountRatio;
    public final double noiseFactor;
    public final double noiseOffset;
    public final Heightmap.Types heightmap;
    
    public NoiseCountFactorDecoratorConfiguration(final int integer, final double double2, final double double3, final Heightmap.Types a) {
        this.noiseToCountRatio = integer;
        this.noiseFactor = double2;
        this.noiseOffset = double3;
        this.heightmap = a;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)Codec.INT.fieldOf("noise_to_count_ratio").forGetter(csl -> csl.noiseToCountRatio), (App)Codec.DOUBLE.fieldOf("noise_factor").forGetter(csl -> csl.noiseFactor), (App)Codec.DOUBLE.fieldOf("noise_offset").withDefault(0.0).forGetter(csl -> csl.noiseOffset), (App)Heightmap.Types.CODEC.fieldOf("heightmap").forGetter(csl -> csl.heightmap)).apply(instance, NoiseCountFactorDecoratorConfiguration::new));
        LOGGER = LogManager.getLogger();
    }
}
