    001package net.minecraftforge.client;
    002
    003import net.minecraft.world.EnumGameType;
    004import net.minecraft.util.EnumOS;
    005import net.minecraft.client.settings.EnumOptions;
    006import net.minecraft.item.EnumRarity;
    007import net.minecraftforge.common.EnumHelper;
    008
    009public class EnumHelperClient extends EnumHelper
    010{
    011
    012    private static Class[][] clentTypes =
    013    {
    014        {EnumGameType.class, int.class, String.class},
    015        {EnumOptions.class, String.class, boolean.class, boolean.class},
    016        {EnumOS.class},
    017        {EnumRarity.class, int.class, String.class}
    018    };
    019
    020    public static EnumGameType addGameType(String name, int id, String displayName)
    021    {
    022        return addEnum(EnumGameType.class, name, id, displayName);
    023    }
    024
    025    public static EnumOptions addOptions(String name, String langName, boolean isSlider, boolean isToggle)
    026    {
    027        return addEnum(EnumOptions.class, name, langName, isSlider, isToggle);
    028    }
    029
    030    public static EnumOS addOS2(String name)
    031    {
    032        return addEnum(EnumOS.class, name);
    033    }
    034
    035    public static EnumRarity addRarity(String name, int color, String displayName)
    036    {
    037        return addEnum(EnumRarity.class, name, color, displayName);
    038    }
    039
    040    public static <T extends Enum<? >> T addEnum(Class<T> enumType, String enumName, Object... paramValues)
    041    {
    042        return addEnum(clentTypes, enumType, enumName, paramValues);
    043    }
    044}