• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FMLLaunchHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: sortTweakers

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
private static void sortTweakers() {
    TaskProfiler profiler = new TaskProfiler();
    profiler.startOnce("Tweak Sorting.");
    LogHelper.info("Sorting tweakers..");
    for (TGameTweak tweak : allTweakers) {
        LogHelper.debug("Attempting registration of tweaker \"%s\"...", tweak.getTweakName());
        if (tweak instanceof TSideTweak) {
            if (!FMLLaunchHandler.side().equals(((TSideTweak) tweak).getSide())) {
                LogHelper.info("Tweaker \"%s\" will NOT be loaded as it is only for %s side!", tweak.getTweakName(), ((TSideTweak) tweak).getSide().toString());
                continue;
            }
        }
        if (tweak.isEnabled()) {
            activeTweakers.add(tweak);
            LogHelper.debug("Successfully registered Tweaker \"%s\"!", tweak.getTweakName());
        }
    }
    TaskProfiler.ProfilerResult result = profiler.endOnce();
    LogHelper.info("Tweaker sorting successfully found %s enabled tweakers in %sMs.", activeTweakers.size(), TimeUnit.NANOSECONDS.toMillis(result.time));
}
 
开发者ID:TheCBProject,项目名称:CCTweaks,代码行数:21,代码来源:TweakRegistry.java


示例2: injectIntoClassLoader

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    // The log4j2 queue is excluded so it is correctly visible from the obfuscated
    // and deobfuscated parts of the code. Without, the UI won't show anything
    classLoader.addClassLoaderExclusion("com.mojang.util.QueueLogAppender");

    classLoader.addClassLoaderExclusion("jline.");
    classLoader.addClassLoaderExclusion("org.fusesource.");
    classLoader.addClassLoaderExclusion("net.minecraftforge.server.console.TerminalConsoleAppender");

    FMLLaunchHandler.configureForServerLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:15,代码来源:FMLServerTweaker.java


示例3: getSigningCertificate

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public Certificate getSigningCertificate()
{
    if (FMLLaunchHandler.side() != Side.CLIENT)
        return null;

    try
    {
        Class<?> cbr = Class.forName("net.minecraft.client.ClientBrandRetriever", false, getClass().getClassLoader());
        Certificate[] certificates = cbr.getProtectionDomain().getCodeSource().getCertificates();
        return certificates != null ? certificates[0] : null;
    }
    catch (Exception e){} // Errors don't matter just return null.
    return null;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:16,代码来源:MinecraftDummyContainer.java


示例4: injectData

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public void injectData(Map<String, Object> data)
{
    liveEnv = (Boolean)data.get("runtimeDeobfuscationEnabled");
    cl = (LaunchClassLoader) data.get("classLoader");
    File mcDir = (File)data.get("mcLocation");
    fmlLocation = (File)data.get("coremodLocation");
    ClassPatchManager.INSTANCE.setup(FMLLaunchHandler.side());
    FMLDeobfuscatingRemapper.INSTANCE.setup(mcDir, cl, (String) data.get("deobfuscationFileName"));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:FMLSanityChecker.java


示例5: transform

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public byte[] transform(String name, String tname, byte[] bytes) {
    if (bytes == null) return null;
    try {
        if (FMLLaunchHandler.side().isClient())
            bytes = transformSubclasses(name, bytes);

        bytes = transformer.transform(name, bytes);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }

    return bytes;
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:15,代码来源:NEITransformer.java


示例6: transform

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
    if (FMLLaunchHandler.side().isClient() && transformedName.equals(TARGET_CLASS_NAME2))
    {
        return transFormMethod(bytes);
    }
    return bytes;
}
 
开发者ID:noto0648,项目名称:SasaLib,代码行数:10,代码来源:SasaClassTransformer.java


示例7: injectIntoClassLoader

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    FMLLaunchHandler.configureForClientLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:7,代码来源:FMLTweaker.java


示例8: handleClientMessage

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
@Override
public IMessage handleClientMessage(TileDataSync message, MessageContext ctx) {
    if(FMLLaunchHandler.side().isClient()) message.sendToClassHandler();
    return null;
}
 
开发者ID:tjkenmate,项目名称:TeslaEssentials,代码行数:6,代码来源:TileDataSync.java


示例9: runtimeSide

import net.minecraftforge.fml.relauncher.FMLLaunchHandler; //导入依赖的package包/类
public static Side runtimeSide() { return FMLLaunchHandler.side(); } 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:2,代码来源:AlchemyEngine.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TransientNetworkDisconnectionException类代码示例发布时间:2022-05-22
下一篇:
Java StateMachine类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap