package net.minecraft.world.level.levelgen.feature.configurations;

import com.mojang.datafixers.kinds.Applicative;
import java.util.function.Function;
import net.minecraft.util.Codecs;
import com.mojang.datafixers.kinds.App;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import com.mojang.serialization.Codec;

public class StrongholdConfiguration {
    public static final Codec<StrongholdConfiguration> CODEC;
    private final int distance;
    private final int spread;
    private final int count;
    
    public StrongholdConfiguration(final int integer1, final int integer2, final int integer3) {
        this.distance = integer1;
        this.spread = integer2;
        this.count = integer3;
    }
    
    public int distance() {
        return this.distance;
    }
    
    public int spread() {
        return this.spread;
    }
    
    public int count() {
        return this.count;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)Codecs.intRange(0, 1023).fieldOf("distance").forGetter((Function)StrongholdConfiguration::distance), (App)Codecs.intRange(0, 1023).fieldOf("spread").forGetter((Function)StrongholdConfiguration::spread), (App)Codecs.intRange(1, 4095).fieldOf("count").forGetter((Function)StrongholdConfiguration::count)).apply(instance, StrongholdConfiguration::new));
    }
}
