Initial commit

This commit is contained in:
Petr Mrázek 2016-04-08 01:20:45 +02:00
commit 9c0786763c
4 changed files with 54 additions and 0 deletions

5
OptiFineHack/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
.directory
out/
*.kate-swp
*.log
*.jar

View file

@ -0,0 +1,39 @@
package org.multimc.hacks;
import net.minecraft.launchwrapper.ITweaker;
import net.minecraft.launchwrapper.LaunchClassLoader;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class OptiFineHackTweaker implements ITweaker
{
private List<String> args;
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile)
{
this.args = new ArrayList(args);
this.args.add("--gameDir");
this.args.add(gameDir.getAbsolutePath());
this.args.add("--assetsDir");
this.args.add(assetsDir.getAbsolutePath());
this.args.add("--version");
this.args.add(profile);
}
public void injectIntoClassLoader(LaunchClassLoader classLoader)
{
classLoader.registerTransformer("optifine.OptiFineClassTransformer");
}
public String getLaunchTarget()
{
return "net.minecraft.client.main.Main";
}
public String[] getLaunchArguments()
{
return args.toArray(new String[this.args.size()]);
}
}

10
OptiFineHack/build.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -e
cd "$(dirname "$0")"
rm -rf out
mkdir out
javac -source 1.5 -target 1.5 -cp "launchwrapper-1.12.jar" *.java -d out/ > build.log 2>&1
cd out
jar cvf ../OptiFineHack-1.jar * >> build.log 2>&1

Binary file not shown.