当前位置: 首页>>代码示例>>Java>>正文


Java IFMLLoadingPlugin类代码示例

本文整理汇总了Java中cpw.mods.fml.relauncher.IFMLLoadingPlugin的典型用法代码示例。如果您正苦于以下问题:Java IFMLLoadingPlugin类的具体用法?Java IFMLLoadingPlugin怎么用?Java IFMLLoadingPlugin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IFMLLoadingPlugin类属于cpw.mods.fml.relauncher包,在下文中一共展示了IFMLLoadingPlugin类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: injectDeobfPlugin

import cpw.mods.fml.relauncher.IFMLLoadingPlugin; //导入依赖的package包/类
private void injectDeobfPlugin() {
    try {
        Class<?> wrapperClass = Class.forName("cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper");
        Constructor wrapperConstructor = wrapperClass.getConstructor(String.class, IFMLLoadingPlugin.class, File.class, Integer.TYPE, String[].class);
        Field f_loadPlugins = CoreModManager.class.getDeclaredField("loadPlugins");
        wrapperConstructor.setAccessible(true);
        f_loadPlugins.setAccessible(true);
        ((List)f_loadPlugins.get(null)).add(2, wrapperConstructor.newInstance("CCCDeobfPlugin", new MCPDeobfuscationTransformer.LoadPlugin(), null, 0, new String[0]));
    } catch (Exception e) {
        logger.error("Failed to inject MCPDeobfuscation Transformer", e);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:CodeChickenCorePlugin.java

示例2: injectNewTransformer

import cpw.mods.fml.relauncher.IFMLLoadingPlugin; //导入依赖的package包/类
private void injectNewTransformer() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException, IllegalAccessException, InvocationTargetException, InstantiationException {
	Class e = Class.forName("cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper");
	Constructor wrapperConstructor = e.getConstructor(new Class[]{String.class, IFMLLoadingPlugin.class, File.class, Integer.TYPE, String[].class});
	Field loadPlugins = CoreModManager.class.getDeclaredField("loadPlugins");
	wrapperConstructor.setAccessible(true);
	loadPlugins.setAccessible(true);
	((List)loadPlugins.get((Object)null)).add(wrapperConstructor.newInstance(new Object[]{"CollectiveFrameworkPlugin", new CollectiveFrameworkTransformerPlugin(), null, Integer.valueOf(Integer.MAX_VALUE), new String[0]}));
	didInject = true;
}
 
开发者ID:austinv11,项目名称:CollectiveFramework,代码行数:10,代码来源:CollectiveFrameworkEarlyTransformerPlugin.java


注:本文中的cpw.mods.fml.relauncher.IFMLLoadingPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。