Minecraft ModLoader Install in Linux

Being a computer geek is kind of fun… unless it’s a holiday weekend and family members continually use you for free technical support.  Of course, when it’s your son, it’s hard to say, “No!”  Besides, I live for technical challenges that need solving with very scant information.

So, on New Years Day, my son was attempting to install ModLoader for Minecraft.  When he had asked, he had already struggled to follow the instructions for some time, and things were NOT going well.

Anyway, it appears that the way that some of the “make-it-easy-to-do-stuff” tools don’t actually do everything right.  Specifically, using “Archive Manager” in Ubuntu Linux to add files to a Java .jar file doesn’t properly work.

So, if you’re trying to follow the install instructions for ModLoader on Linux and your program freezes on the Mojang splash-screen, the .jar file it is likely that your jar file is somehow corrupted.  The best way to add the appropriate files to your minecraft.jar file is to create a new directory and unzip the minecraft.jar file into that directory.  Add the appropriate files.  Zip up the directory again and rename it minecraft.jar.

Make sure to use the -r (recurse subdirectories) when zipping up the jar file again.  Otherwise, the .jar file will still be incomplete.

Here’s a quick transcript of what we did to recreate the minecraft.jar file with the proper files from ModLoader 1.0.0:

A couple of notes – ModLoader.zip was placed in the .minecraft/Downloads directory (a directory specifically created to store minecraft download files like mods and others).

#cd ~/.minecraft/Downloads
#mkdir ModLoader
#cd ModLoader
#cp ../ModLoader.zip .
#unzip ModLoader.zip
#cd ~/.minecraft/bin
#cp minecraft.jar minecraft.orig.jar               #NOTE: Make a backup copy – just in case
#mkdir modloader-workdir
#cd modloader-workdir
#cp ../minecraft.jar .
#unzip minecraft.jar
#rm minecraft.jar
#cp ../../Downloads/ModLoader/* .
#rm -r META-INF #NOTE: This REQUIRED STEP missed in original posting
#zip -r minecraft.zip *
#mv minecraft.zip ../minecraft.jar
#cd ..
#rm -rf modloader-workdir

That will create a new minecraft.jar file with the ModLoader classfiles.  NOTE: You will need to follow these instructions any time MineCraft updates (even if it’s a forced update) – so make sure to keep the ModLoader.zip file around.

Hopefully this will help others, but more importantly, it’ll help me remember what the heck I did when Minecraft gets updated and I need to redo this.

LINKS:

5 thoughts on “Minecraft ModLoader Install in Linux

  1. Sorry you’re having trouble.

    When my we did this, we did notice that some MODS actually broke minecraft. It’s best to make these changes without having any mods actually installed, then install the mods you would like to use one-by-one. That way if one of them is broken, you’ll know exactly which one it is.

    Hope that helps!

  2. your stuff will work if you where not missing a step in it. The step that is missing before you rezip the file you need to rm -f META-INF so if you

    #cd ~/.minecraft/Downloads
    #mkdir ModLoader
    #cd ModLoader
    #cp ../ModLoader.zip .
    #unzip ModLoader.zip
    #cd ~/.minecraft/bin
    #cp minecraft.jar minecraft.orig.jar #NOTE: Make a backup copy – just in case
    #mkdir modloader-workdir
    #cd modloader-workdir
    #cp ../minecraft.jar
    #unzip minecraft.jar
    #rm minecraft.jar
    #cp ../../Downloads/ModLoader/* .
    #rm -r META-INF #NOTE: This REQUIRED STEP missed in original posting
    #zip -r minecraft.zip *
    #mv minecraft.zip ../minecraft.jar
    #cd ..
    #rm -rf modloader-workdir

    this should work and not crash the minecraft

    [Site Editor’s Note: I corrected the original post to reflect this information and added a note to this comment to reflect the change made.]

    • Thanks so much for the correction! Apparently somehow I missed that when I looked back through the log of what I did to create the post. I appreciate the correction!

  3. There were some small typos in the transscript (missing cp target, missing -a switch on cp)

    Following script might also help:

    ——
    #!/bin/bash

    MOD=”$1″

    [ -n “$MOD” -a -e “$MOD” ] || { echo “modloader “; exit 1; }

    set -e

    JAR=~/.minecraft/bin/minecraft.jar

    test -e ${JAR}.orig || \
    cp -v ${JAR} ${JAR}.orig

    WORKDIR=`mktemp -d`
    cd $WORKDIR

    echo “unzip the original minecraft jar”
    unzip ~/.minecraft/bin/minecraft.jar.orig >/dev/null 2>&1
    echo “patch the minecraft files”
    unzip -o “$MOD” >/dev/null 2>&1
    echo “create the new minecraft.jar”
    rm -rf META-INF/
    zip -r /tmp/minecraft.zip * >/dev/null 2>&1
    echo “install the new minecraft.jar”
    mv /tmp/minecraft.zip ~/.minecraft/bin/minecraft.jar
    echo “cleanup…”
    cd ~
    rm -rf $WORKDIR
    echo “DONE!”
    ——