package net.minecraft.world.level.levelgen;

import javax.annotation.Nullable;
import java.util.stream.Collectors;
import java.util.Arrays;
import java.util.function.Function;
import java.util.Map;
import com.mojang.serialization.Codec;
import net.minecraft.util.StringRepresentable;

public class GenerationStep {
    public enum Decoration implements StringRepresentable {
        RAW_GENERATION("raw_generation"), 
        LAKES("lakes"), 
        LOCAL_MODIFICATIONS("local_modifications"), 
        UNDERGROUND_STRUCTURES("underground_structures"), 
        SURFACE_STRUCTURES("surface_structures"), 
        STRONGHOLDS("strongholds"), 
        UNDERGROUND_ORES("underground_ores"), 
        UNDERGROUND_DECORATION("underground_decoration"), 
        VEGETAL_DECORATION("vegetal_decoration"), 
        TOP_LAYER_MODIFICATION("top_layer_modification");
        
        public static final Codec<Decoration> CODEC;
        private static final Map<String, Decoration> BY_NAME;
        private final String name;
        
        private Decoration(final String string3) {
            this.name = string3;
        }
        
        public String getName() {
            return this.name;
        }
        
        public static Decoration byName(final String string) {
            return Decoration.BY_NAME.get(string);
        }
        
        @Override
        public String getSerializedName() {
            return this.name;
        }
        
        static {
            CODEC = StringRepresentable.<Decoration>fromEnum(Decoration::values, Decoration::byName);
            BY_NAME = Arrays.<Decoration>stream(values()).collect(Collectors.toMap(Decoration::getName, b -> b));
        }
    }
    
    public enum Carving implements StringRepresentable {
        AIR("air"), 
        LIQUID("liquid");
        
        public static final Codec<Carving> CODEC;
        private static final Map<String, Carving> BY_NAME;
        private final String name;
        
        private Carving(final String string3) {
            this.name = string3;
        }
        
        public String getName() {
            return this.name;
        }
        
        @Nullable
        public static Carving byName(final String string) {
            return Carving.BY_NAME.get(string);
        }
        
        @Override
        public String getSerializedName() {
            return this.name;
        }
        
        static {
            CODEC = StringRepresentable.<Carving>fromEnum(Carving::values, Carving::byName);
            BY_NAME = Arrays.<Carving>stream(values()).collect(Collectors.toMap(Carving::getName, a -> a));
        }
    }
}
