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

import java.util.function.BiFunction;
import com.mojang.datafixers.kinds.Applicative;
import com.mojang.datafixers.kinds.App;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import com.mojang.serialization.Codec;

public class SeagrassFeatureConfiguration implements FeatureConfiguration {
    public static final Codec<SeagrassFeatureConfiguration> CODEC;
    public final int count;
    public final double tallSeagrassProbability;
    
    public SeagrassFeatureConfiguration(final int integer, final double double2) {
        this.count = integer;
        this.tallSeagrassProbability = double2;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)Codec.INT.fieldOf("count").forGetter(col -> col.count), (App)Codec.DOUBLE.fieldOf("probability").forGetter(col -> col.tallSeagrassProbability)).apply(instance, (BiFunction)SeagrassFeatureConfiguration::new));
    }
}
