Add a terminal transformer and tweaker.
This commit is contained in:
parent
e8c251808b
commit
87dde51b8d
3 changed files with 48 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
package cpw.mods.fml.common.asm.transformers;
|
||||
|
||||
import net.minecraft.launchwrapper.IClassTransformer;
|
||||
|
||||
public class TerminalTransformer implements IClassTransformer {
|
||||
@Override
|
||||
public byte[] transform(String name, String transformedName, byte[] basicClass)
|
||||
{
|
||||
return basicClass;
|
||||
}
|
||||
|
||||
}
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import cpw.mods.fml.relauncher.CoreModManager;
|
||||
|
||||
import net.minecraft.launchwrapper.ITweaker;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
|
||||
/**
|
||||
|
@ -30,6 +31,9 @@ public class FMLInjectionAndSortingTweaker implements ITweaker {
|
|||
{
|
||||
// We sort the tweak list here so that it obeys the tweakordering
|
||||
CoreModManager.sortTweakList();
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> newTweaks = (List<String>) Launch.blackboard.get("TweakClasses");
|
||||
newTweaks.add("cpw.mods.fml.common.launcher.TerminalTweaker");
|
||||
}
|
||||
run = true;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package cpw.mods.fml.common.launcher;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import net.minecraft.launchwrapper.ITweaker;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
|
||||
public final class TerminalTweaker implements ITweaker {
|
||||
@Override
|
||||
public void injectIntoClassLoader(LaunchClassLoader classLoader)
|
||||
{
|
||||
classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.TerminalTransformer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLaunchTarget()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLaunchArguments()
|
||||
{
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue