An open-source library for launching Minecraft (uses mclaunch-util-lib
by Kronos666).
It can run Minecraft client with a few codes.
See releases.
- gson 2.2.4 https://code.google.com/p/google-gson/
- (Included) mclaunch-util-lib 0.1 https://github.com/Kronos666/mclaunch-util-lib/tree/master/release/
Jmccc jmccc = new Jmccc(new BaseOptions("/path/to/your/minecraft/client/.minecraft", "/path/to/you/java/path"));
Jmccc jmccc = new Jmccc(new BaseOptions("/path/to/your/minecraft/client/.minecraft"));
Jmccc jmccc = new Jmccc(); // equals: Jmccc jmccc = new Jmccc(new BaseOptions());
Version versionToLaunch = jmccc.getVersionsHandler().getVersionById("1.8");
IAuthenticator authenticator = new OfflineAuthenticator("your_name");
IAuthenticator authenticator = new YggdrasilAuthenticator("[email protected]", "your_password");
LaunchOption option = new LaunchOption(versionToLaunch, authenticator);
option.setMaxMemory(1024); //optional
option.setMinMemory(512); //optional
option.setServerInfo(new ServerInfo("helloworld", 25565)); //optional
option.setWindowSize(new WindowSize(512, 1024)); //optional
LaunchArgument arg = jmccc.generateLaunchArgs(option);
//Remember to generate LaunchArgs before getting the missing libraries and natives.
for(Library lib : Jmccc.MISSING_LIBRARIES) {
System.out.println("Missing Library: " + lib.getName());
}
for(Native nat : Jmccc.MISSING_NATIVES) {
System.out.println("Missing Native: " + nat.getName());
}
jmccc.launchGame(arg);
Windows:
gradlew clean build
Linux:
./gradlew clean build
- Bugs fixing.
Jmccc.VERSION
->Reporter.version
- Bugs fixing.
- Bugs fixing.
- Added method
VersionsHandler.getVersionById(String id)
.
- Removed Lombok dependency.
- Bugs fixing.
IGameListener
is still WIP.