I was playing around with the minecraft version files when I read about modifying the
version.jar file to modify your game. I began to try out stuff and got stuck almost immediately.
I work on a Mac using the Terminal app.
My issue is the following:
I start having the
version.jar file into a
jar -xf version.jar witch seems to extract the file filling the folder with
.class files, some other files and some folders including the folder
At this point I try to recreate the
version.jar file which is still present in
jar -cmf META-INF/MANIFEST.MF 1.12.2_mod.jar * witch creates a new
Now I try to run it but it does not work.
Analyzing the dimension of both files (before and after), I don't get the same size: the original is
10’180’113 bytes and the new one
How can I resolve my issue?
Before trying to use the terminal I used the native decompress tool of MacOS, then compressed it to zip and finally renamed the extention into
.jar. Doesn't work.
Same result if I renamed first the
.jar extention into
.zip, decompressed, compressed and finally renamed the extention. Doesn't work.
I tried also to use Keka to compress and decompress zip files. Doesn't work.
I could try to inject files into the
version.jar file, but I've had a hard time with the syntax of the command...
Hello myself from the past!
.jar files on a Mac without to extract and recreate you can do the following:
version.jar on a new separate folder.
mv version.jar tmp/version.jar
jar -xf tmp/version.jar
tmp folder you can select the files you want to edit and bring them outside inside
jar -uf version.jar freshly_selected_file
Now you can run your
version.jar with your modifications.