Gitter Build Status
A powerful open-source library for launching and downloading Minecraft.


JMCCC is licensed under the MIT license.


Quick Start


Dependency Description
org.to2mbn:jmccc Minecraft launching feature.
org.to2mbn:jmccc-yggdrasil-authenticator Yggdrasil authentication feature.
org.to2mbn:jmccc-mcdownloader Minecraft downloading feature.
org.to2mbn:jmccc-mojang-api Mojang API client.

The snapshot repository:


Launching Minecraft

MinecraftDirectory dir = new MinecraftDirectory("/home/user/.minecraft");
Launcher launcher = LauncherBuilder.buildDefault();
launcher.launch(new LaunchOption("1.10", YggdrasilAuthenticator.password("<email>", "<password>"), dir));

You can replace YggdrasilAuthenticator.password("<email>", "<password>") with new OfflineAuthenticator("<username>") if you want to use offline authentication.

Downloading Minecraft

MinecraftDirectory dir = new MinecraftDirectory("/home/user/.minecraft");
MinecraftDownloader downloader = MinecraftDownloaderBuilder.buildDefault();
downloader.downloadIncrementally(dir, "1.10", new CallbackAdapter<Version>() {

    public void failed(Throwable e) {
        // when the task fails

    public void done(Version result) {
        // when the task finishes

    public void cancelled() {
        // when the task cancels

    public <R> DownloadCallback<R> taskStart(DownloadTask<R> task) {
        // when a new sub download task starts
        // return a DownloadCallback to listen the status of the task
        return new CallbackAdapter<R>() {

            public void done(R result) {
                // when the sub download task finishes

            public void failed(Throwable e) {
                // when the sub download task fails

            public void cancelled() {
                // when the sub download task cancels

            public void updateProgress(long done, long total) {
                // when the progress of the sub download task has updated

            public void retry(Throwable e, int current, int max) {
                // when the sub download task fails, and the downloader decides to retry the task
                // in this case, failed() won't be called

You can pass a null callback if you don't want to monitor the whole task. You can also return null in taskStart() if you don't want to monitor sub tasks.

Don't forget to shutdown the downloader when you are no longer going to use it.


Downloading Forge/Liteloader

MinecraftDirectory dir = new MinecraftDirectory("/home/user/.minecraft");
ForgeDownloadProvider forgeProvider = new ForgeDownloadProvider();
LiteloaderDownloadProvider liteloaderProvider = new LiteloaderDownloadProvider();
MinecraftDownloader downloader = MinecraftDownloaderBuilder.create()

downloader.downloadIncrementally(dir, "1.8-forge1.8-", new CallbackAdapter<Version>() {...});
downloader.downloadIncrementally(dir, "1.7.10-LiteLoader1.7.10", new CallbackAdapter<Version>() {...});, new CallbackAdapter<ForgeVersionList>() {...});, new CallbackAdapter<LiteloaderVersionList>() {...});

FML options

JMCCC won't add fml options (such as -Dfml.ignoreInvalidMinecraftCertificates=true and -Dfml.ignorePatchDiscrepancies=true) to the command line automatically. If you have problems launching forge, you may need to add these arguments manually. These arguments are already defined in class ExtraArgumentsTemplates.