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 net.minecraft.world.level.block.state.BlockState;
import com.mojang.serialization.Codec;

public class BlockBlobConfiguration implements FeatureConfiguration {
    public static final Codec<BlockBlobConfiguration> CODEC;
    public final BlockState state;
    public final int startRadius;
    
    public BlockBlobConfiguration(final BlockState cfj, final int integer) {
        this.state = cfj;
        this.startRadius = integer;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)BlockState.CODEC.fieldOf("state").forGetter(cne -> cne.state), (App)Codec.INT.fieldOf("start_radius").withDefault(0).forGetter(cne -> cne.startRadius)).apply(instance, (BiFunction)BlockBlobConfiguration::new));
    }
}
