Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I want to change my minecraft name to be able to connect offline with friends on a mac and I am doing so at the moment with this command:

#!/bin/bash

 cd ~/Library/Application\ Support/minecraft

 - Djava.library.path="bin/natives"

 net.minecraft.client.Minecraft "YOURNAMEHERE"

It has been working fine but I have a texture pack that uses MCpatcher. It works fine when I go through the normal launcher but when I go through this command file, Some of the fundamental textures don't work. It's like it skips the patcher files! Now I tried my best with the little java coding knowledge I have but to no avail so I was wondering if someone could come up with another code that works with MCPatcher. I think all it's doing is missing a couple of class files but I could be wrong.

All help would be Greatly Appreciated

Thanks

share|improve this question
    
Since MCPatcher patches the JAR like any other mod, I doubt that's the issue at stake here. Are you sure you applied MCPatcher properly? –  Alexis King May 19 '12 at 7:41
    
I'm sure it patched properly because it works fine when I launch minecraft via the proper launcher but when I launch it from this command line it doesn't work. Thanks anyway. –  Jonathan May 20 '12 at 8:51

1 Answer 1

I have finally found the answer to this perplexing problem. MCPatcher automatically creates backup JARs in your minecraft/bin folder, usually just titled minecraft-{version}.jar, or something like that.

Since the command line is only specifying the entire application data folder, not the patched JAR specifically, there's a high possibility that it's using the unpatched JAR's files instead of the patched ones.

Obviously, you can just delete the backups to make sure that the new files are being used. However, this is an imperfect solution. Here is a revised shell script that fixes the problem:

#!/bin/bash
cd ~/Library/Application\ Support/minecraft
java -Xms512m -Xmx1024m -cp "bin/minecraft.jar:bin/*" -Djava.library.path="bin/natives" net.minecraft.client.Minecraft "YOURNAMEHERE"

This gives priority to the original JAR, loading the patched classes properly. Note that if using this on Windows, you may need to replace the colon with a semicolon, yielding a classpath string that looks like this: bin/minecraft.jar;bin/*

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.