Java 类cpw.mods.fml.common.discovery.asm.ModAnnotation 实例源码

项目:TRHS_Club_Mod_2016    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.severe("Found a BaseMod type mod %s", className);
        FMLLog.severe("This will not be loaded and will be ignored. ModLoader mechanisms are no longer available.");
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (modTypes.containsKey(ann.getASMType()))
        {
            FMLLog.fine("Identified a mod of type %s (%s) - loading", ann.getASMType(), className);
            try {
                return modTypes.get(ann.getASMType()).newInstance(className, container, ann.getValues());
            } catch (Exception e) {
                FMLLog.log(Level.ERROR, e, "Unable to construct %s container", ann.getASMType().getClassName());
                return null;
            }
        }
    }

    return null;
}
项目:CauldronGit    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.severe("Found a BaseMod type mod %s", className);
        FMLLog.severe("This will not be loaded and will be ignored. ModLoader mechanisms are no longer available.");
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:Cauldron    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.severe("Found a BaseMod type mod %s", className);
        FMLLog.severe("This will not be loaded and will be ignored. ModLoader mechanisms are no longer available.");
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:Cauldron    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.severe("Found a BaseMod type mod %s", className);
        FMLLog.severe("This will not be loaded and will be ignored. ModLoader mechanisms are no longer available.");
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:Cauldron    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.severe("Found a BaseMod type mod %s", className);
        FMLLog.severe("This will not be loaded and will be ignored. ModLoader mechanisms are no longer available.");
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:RuneCraftery    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a BaseMod type mod %s", className);
        return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties());
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:RuneCraftery    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a BaseMod type mod %s", className);
        return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties());
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}
项目:BetterNutritionMod    文件:ModContainerFactory.java   
public ModContainer build(ASMModParser modParser, File modSource, ModCandidate container)
{
    String className = modParser.getASMType().getClassName();
    if (modParser.isBaseMod(container.getRememberedBaseMods()) && modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a BaseMod type mod %s", className);
        return new ModLoaderModContainer(className, modSource, modParser.getBaseModProperties());
    }
    else if (modClass.matcher(className).find())
    {
        FMLLog.fine("Identified a class %s following modloader naming convention but not directly a BaseMod or currently seen subclass", className);
        container.rememberModCandidateType(modParser);
    }
    else if (modParser.isBaseMod(container.getRememberedBaseMods()))
    {
        FMLLog.fine("Found a basemod %s of non-standard naming format", className);
        container.rememberBaseModType(className);
    }

    // We warn if it's not a basemod instance -- compatibility requires it to be in net.minecraft.src *sigh*
    if (className.startsWith("net.minecraft.src.") && container.isClasspath() && !container.isMinecraftJar())
    {
        FMLLog.severe("FML has detected a mod that is using a package name based on 'net.minecraft.src' : %s. This is generally a severe programming error. "
                + " There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into "
                + "a new package. Go on. DO IT NOW!",className);
    }

    for (ModAnnotation ann : modParser.getAnnotations())
    {
        if (ann.getASMType().equals(Type.getType(Mod.class)))
        {
            FMLLog.fine("Identified an FMLMod type mod %s", className);
            return new FMLModContainer(className, container, ann.getValues());
        }
    }

    return null;
}