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

import net.minecraft.world.level.block.Blocks;
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;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;

public class HugeFungusConfiguration implements FeatureConfiguration {
    public static final Codec<HugeFungusConfiguration> CODEC;
    public static final HugeFungusConfiguration HUGE_CRIMSON_FUNGI_PLANTED_CONFIG;
    public static final HugeFungusConfiguration HUGE_CRIMSON_FUNGI_NOT_PLANTED_CONFIG;
    public static final HugeFungusConfiguration HUGE_WARPED_FUNGI_PLANTED_CONFIG;
    public static final HugeFungusConfiguration HUGE_WARPED_FUNGI_NOT_PLANTED_CONFIG;
    public final BlockState validBaseState;
    public final BlockState stemState;
    public final BlockState hatState;
    public final BlockState decorState;
    public final boolean planted;
    
    public HugeFungusConfiguration(final BlockState cfj1, final BlockState cfj2, final BlockState cfj3, final BlockState cfj4, final boolean boolean5) {
        this.validBaseState = cfj1;
        this.stemState = cfj2;
        this.hatState = cfj3;
        this.decorState = cfj4;
        this.planted = boolean5;
    }
    
    static {
        CODEC = RecordCodecBuilder.create(instance -> ((RecordCodecBuilder.Instance)instance).group((App)BlockState.CODEC.fieldOf("valid_base_block").forGetter(cky -> cky.validBaseState), (App)BlockState.CODEC.fieldOf("stem_state").forGetter(cky -> cky.stemState), (App)BlockState.CODEC.fieldOf("hat_state").forGetter(cky -> cky.hatState), (App)BlockState.CODEC.fieldOf("decor_state").forGetter(cky -> cky.decorState), (App)Codec.BOOL.fieldOf("planted").withDefault(false).forGetter(cky -> cky.planted)).apply(instance, HugeFungusConfiguration::new));
        HUGE_CRIMSON_FUNGI_PLANTED_CONFIG = new HugeFungusConfiguration(Blocks.CRIMSON_NYLIUM.defaultBlockState(), Blocks.CRIMSON_STEM.defaultBlockState(), Blocks.NETHER_WART_BLOCK.defaultBlockState(), Blocks.SHROOMLIGHT.defaultBlockState(), true);
        HUGE_CRIMSON_FUNGI_NOT_PLANTED_CONFIG = new HugeFungusConfiguration(HugeFungusConfiguration.HUGE_CRIMSON_FUNGI_PLANTED_CONFIG.validBaseState, HugeFungusConfiguration.HUGE_CRIMSON_FUNGI_PLANTED_CONFIG.stemState, HugeFungusConfiguration.HUGE_CRIMSON_FUNGI_PLANTED_CONFIG.hatState, HugeFungusConfiguration.HUGE_CRIMSON_FUNGI_PLANTED_CONFIG.decorState, false);
        HUGE_WARPED_FUNGI_PLANTED_CONFIG = new HugeFungusConfiguration(Blocks.WARPED_NYLIUM.defaultBlockState(), Blocks.WARPED_STEM.defaultBlockState(), Blocks.WARPED_WART_BLOCK.defaultBlockState(), Blocks.SHROOMLIGHT.defaultBlockState(), true);
        HUGE_WARPED_FUNGI_NOT_PLANTED_CONFIG = new HugeFungusConfiguration(HugeFungusConfiguration.HUGE_WARPED_FUNGI_PLANTED_CONFIG.validBaseState, HugeFungusConfiguration.HUGE_WARPED_FUNGI_PLANTED_CONFIG.stemState, HugeFungusConfiguration.HUGE_WARPED_FUNGI_PLANTED_CONFIG.hatState, HugeFungusConfiguration.HUGE_WARPED_FUNGI_PLANTED_CONFIG.decorState, false);
    }
}
