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

import com.mojang.datafixers.kinds.Applicative;
import com.mojang.datafixers.kinds.App;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.world.level.levelgen.structure.OceanRuinFeature;
import com.mojang.serialization.Codec;

public class OceanRuinConfiguration implements FeatureConfiguration {
    public static final Codec<OceanRuinConfiguration> CODEC;
    public final OceanRuinFeature.Type biomeTemp;
    public final float largeProbability;
    public final float clusterProbability;
    
    public OceanRuinConfiguration(final OceanRuinFeature.Type b, final float float2, final float float3) {
        this.biomeTemp = b;
        this.largeProbability = float2;
        this.clusterProbability = float3;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)OceanRuinFeature.Type.CODEC.fieldOf("biome_temp").forGetter(cob -> cob.biomeTemp), (App)Codec.FLOAT.fieldOf("large_probability").forGetter(cob -> cob.largeProbability), (App)Codec.FLOAT.fieldOf("cluster_probability").forGetter(cob -> cob.clusterProbability)).apply(instance, OceanRuinConfiguration::new));
    }
}
