當前位置: 首頁>>代碼示例>>Java>>正文


Java LaunchClassLoader.addClassLoaderExclusion方法代碼示例

本文整理匯總了Java中net.minecraft.launchwrapper.LaunchClassLoader.addClassLoaderExclusion方法的典型用法代碼示例。如果您正苦於以下問題:Java LaunchClassLoader.addClassLoaderExclusion方法的具體用法?Java LaunchClassLoader.addClassLoaderExclusion怎麽用?Java LaunchClassLoader.addClassLoaderExclusion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.launchwrapper.LaunchClassLoader的用法示例。


在下文中一共展示了LaunchClassLoader.addClassLoaderExclusion方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: configureLaunchClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
private static void configureLaunchClassLoader(final LaunchClassLoader loader) {
    // Logging
    loader.addClassLoaderExclusion("org.slf4j.");
    loader.addClassLoaderExclusion("org.jline.");
    loader.addClassLoaderExclusion("com.sun.");
    loader.addClassLoaderExclusion("com.mojang.util.QueueLogAppender");

    // Neptune Launch
    loader.addClassLoaderExclusion("com.google.common.");
    loader.addClassLoaderExclusion("org.neptunepowered.vanilla.launch.");

    // Don't allow transforming libraries
    loader.addTransformerExclusion("com.google.");
    loader.addTransformerExclusion("org.apache.");
    loader.addTransformerExclusion("joptsimple.");
    loader.addTransformerExclusion("io.netty.");
    loader.addTransformerExclusion("it.unimi.dsi.fastutil.");
    loader.addTransformerExclusion("com.github.benmanes.caffeine.");
    loader.addTransformerExclusion("net.visualillusionsent.utils.");

    // Add a transformer exclusion for translator so we can get the JAR path from it
    loader.addTransformerExclusion("net.canarymod.Translator");
}
 
開發者ID:NeptunePowered,項目名稱:NeptuneMod,代碼行數:24,代碼來源:NeptuneServerTweaker.java

示例2: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader launchClassLoader) {
    launchClassLoader.addClassLoaderExclusion("org.apache.logging.log4j.");
    MixinBootstrap.init();

    Mixins.addConfiguration("mixins.serenity.core.json");
    MixinEnvironment.getDefaultEnvironment().setObfuscationContext("notch");
    MixinEnvironment.getDefaultEnvironment().setSide(MixinEnvironment.Side.CLIENT);
}
 
開發者ID:SerenityEnterprises,項目名稱:SerenityCE,代碼行數:10,代碼來源:SerenityTweaker.java

示例3: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的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

示例4: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    classLoader.addClassLoaderExclusion("org.apache.");
    classLoader.addClassLoaderExclusion("com.google.common.");
    classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
    classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
    classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
    classLoader.addClassLoaderExclusion("LZMA.");
    FMLLaunchHandler.configureForClientLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:13,代碼來源:FMLTweaker.java

示例5: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    // The mojang packages are excluded so the log4j2 queue is correctly visible from
    // the obfuscated and deobfuscated parts of the code. Without, the UI won't show anything
    classLoader.addClassLoaderExclusion("com.mojang.");
    classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
    classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
    classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
    classLoader.addClassLoaderExclusion("LZMA.");
    FMLLaunchHandler.configureForServerLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:14,代碼來源:FMLServerTweaker.java

示例6: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
    classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
    classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
    classLoader.addClassLoaderExclusion("LZMA.");
    FMLLaunchHandler.configureForClientLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:FMLTweaker.java

示例7: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
    classLoader.addTransformerExclusion("cpw.mods.fml.repackage.");
    classLoader.addTransformerExclusion("cpw.mods.fml.relauncher.");
    classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers.");
    classLoader.addClassLoaderExclusion("LZMA.");
    FMLLaunchHandler.configureForServerLaunch(classLoader, this);
    FMLLaunchHandler.appendCoreMods();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:FMLServerTweaker.java

示例8: injectIntoClassLoader

import net.minecraft.launchwrapper.LaunchClassLoader; //導入方法依賴的package包/類
@Override
public void injectIntoClassLoader(LaunchClassLoader loader) {
    logger.info("Initializing nailed");

    loader.addClassLoaderExclusion("scala.");
    loader.addClassLoaderExclusion("LZMA.");
    loader.addClassLoaderExclusion("com.google.");
    loader.addClassLoaderExclusion("com.nothome.delta.");
    loader.addClassLoaderExclusion("org.apache.");
    loader.addClassLoaderExclusion("com.mojang.");
    loader.addClassLoaderExclusion("org.fusesource.");
    loader.addClassLoaderExclusion("io.netty.");
    loader.addClassLoaderExclusion("gnu.trove.");
    loader.addClassLoaderExclusion("joptsimple.");
    loader.addClassLoaderExclusion("jk_5.nailed.server.mixin.");
    loader.addClassLoaderExclusion("jk_5.nailed.launch.");
    loader.addClassLoaderExclusion("jk_5.nailed.server.tweaker.");
    loader.addClassLoaderExclusion("org.spongepowered.tools.");

    BinPatchManager.instance().setup();

    loader.registerTransformer("jk_5.nailed.server.tweaker.transformer.PatchingTransformer");
    loader.registerTransformer("jk_5.nailed.server.tweaker.transformer.EventSubscriptionTransformer");

    logger.info("Applying runtime deobfuscation...");
    if(isObfuscated()){
        Launch.blackboard.put("nailed.deobf-srg", Paths.get("bin", "deobf.srg.gz"));
        loader.registerTransformer("jk_5.nailed.launch.transformers.DeobfuscationTransformer");
        logger.info("Runtime deobfuscation is applied.");
    } else {
        logger.info("Runtime deobfuscation was not applied. Nailed is being loaded in a deobfuscated environment.");
    }

    logger.info("Applying access transformer...");
    Launch.blackboard.put("nailed.at", "nailed_at.cfg");
    loader.registerTransformer("jk_5.nailed.launch.transformers.AccessTransformer");

    logger.info("Initializing Mixin environment...");
    MixinBootstrap.init();
    MixinEnvironment env = MixinEnvironment.getCurrentEnvironment();
    env.addConfiguration("mixins.nailed.core.json");
    env.setSide(MixinEnvironment.Side.SERVER);
    loader.registerTransformer(MixinBootstrap.TRANSFORMER_CLASS);

    logger.info("Initialization finished. Starting Minecraft server...");
}
 
開發者ID:nailed,項目名稱:nailed,代碼行數:47,代碼來源:ServerTweaker.java


注:本文中的net.minecraft.launchwrapper.LaunchClassLoader.addClassLoaderExclusion方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。