Initial commit
This commit is contained in:
commit
9c0786763c
4 changed files with 54 additions and 0 deletions
5
OptiFineHack/.gitignore
vendored
Normal file
5
OptiFineHack/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
.directory
|
||||
out/
|
||||
*.kate-swp
|
||||
*.log
|
||||
*.jar
|
39
OptiFineHack/OptiFineHackTweaker.java
Normal file
39
OptiFineHack/OptiFineHackTweaker.java
Normal 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
10
OptiFineHack/build.sh
Executable 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
|
BIN
OptiFineHack/launchwrapper-1.12.jar
Normal file
BIN
OptiFineHack/launchwrapper-1.12.jar
Normal file
Binary file not shown.
Loading…
Reference in a new issue