Switch to the MCPHackers launchwrapper

This commit is contained in:
zontreck 2024-03-17 02:45:57 -07:00
parent 21ca363d2e
commit 74b0fcce0f
2 changed files with 6 additions and 28 deletions

View file

@ -65,7 +65,9 @@ dependencies {
provided "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
provided "org.lwjgl.lwjgl:lwjgl_util:$lwjglVersion"
provided platform("org.lwjgl.lwjgl:lwjgl-platform:$lwjglVersion-$lwjglNatives")
provided "dev.zontreck:LibAC:1.5.11"
provided 'org.mcphackers:launchwrapper:1.0'
}
@ -78,10 +80,11 @@ java {
application {
// Define the main class for the application.
mainClass = 'net.minecraft.client.Minecraft'
mainClass = 'org.mcphackers.launchwrapper.Launch'
}
jar {
duplicatesStrategy = "exclude"
manifest {
attributes (
'Main-Class': application.mainClass,
@ -128,7 +131,7 @@ task jarjar(type: Jar) {
run {
jvmArgs("-Djava.library.path=./natives")
jvmArgs ["-Djava.library.path=${project.nativeLibsDir}",]
}
jar.finalizedBy(jarjar)

View file

@ -14,10 +14,6 @@ import java.time.Instant;
import java.util.Random;
import javax.swing.JOptionPane;
import dev.zontreck.ariaslib.args.*;
import dev.zontreck.ariaslib.http.HTTPMethod;
import dev.zontreck.ariaslib.http.HTTPRequestBuilder;
import dev.zontreck.ariaslib.http.HTTPResponse;
import net.minecraft.client.controller.PlayerController;
import net.minecraft.client.controller.PlayerControllerCreative;
import net.minecraft.client.effect.EffectRenderer;
@ -1357,25 +1353,4 @@ public final class Minecraft implements Runnable {
System.gc();
}
public static void main(String[] args)
{
Minecraft minecraft = new Minecraft((Canvas)null, 800, 600, false);
Random rng = new Random();
rng.setSeed(Instant.now().getEpochSecond());
Arguments defaults = ArgumentsBuilder.builder().withArgument(new StringArgument("username", "Player" + String.valueOf(rng.nextInt()).substring(5)))
.build();
Arguments parser = ArgumentsParser.parseArguments(args, defaults);
StringArgument unArg = (StringArgument) parser.getArg("username");
if(parser.hasArg("username")) {
minecraft.session = new Session(unArg.getValue());
}
new Thread(minecraft).start();
}
}