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

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

public class JigsawConfiguration implements FeatureConfiguration {
    public static final Codec<JigsawConfiguration> CODEC;
    public final ResourceLocation startPool;
    public final int size;
    
    public JigsawConfiguration(final ResourceLocation uh, final int integer) {
        this.startPool = uh;
        this.size = integer;
    }
    
    public int getSize() {
        return this.size;
    }
    
    public ResourceLocation getStartPool() {
        return this.startPool;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)ResourceLocation.CODEC.fieldOf("start_pool").forGetter((Function)JigsawConfiguration::getStartPool), (App)Codec.INT.fieldOf("size").forGetter((Function)JigsawConfiguration::getSize)).apply(instance, (BiFunction)JigsawConfiguration::new));
    }
}
