Skip to content

Instantly share code, notes, and snippets.

@NeRdTheNed
Last active July 16, 2024 07:20
Show Gist options
  • Save NeRdTheNed/37b84c7a96a0b24fbc1ca76613f5bae6 to your computer and use it in GitHub Desktop.
Save NeRdTheNed/37b84c7a96a0b24fbc1ca76613f5bae6 to your computer and use it in GitHub Desktop.
How to set up a functional Forge 1.2.5 workspace in 2020.

How to set up a Forge 1.2.5 workspace in 2020 & above.

Automatic script (recommended)

I've created a bash script that sets up Forge 1.2.5, which you can find here! It automatically does each step of this guide for you, and includes a fix for sounds.

Manual setup

TODO: Add a section on installing the resources (sounds) folder to the MCP environment. The links have changed and Minecraft 1.2.5 isn't able to download them anymore.

Downloads:

Make sure to always have a backup copy of all of these downloaded files! I'd recommend putting them into a seperate folder from your MCP / Forge project directory.

  1. Forge: Download the Forge 1.2.5 source distribution you'd like to use (it's recommended to use the latest released version). These can be found on the official Forge website.
  2. MCP: Download the Mod Coder Pack for 1.2.5 (mcp62). The Minecraft wiki has a list of MCP versions with download links here.
  3. Fernflower: You'll also need to obtain a specific version of Fernflower, as the automatic download link mcp62 used is now non-functional. This version of Fernflower is important, as using newer versions of Fernflower will break Forge's patches, which were intended to fix some of Fernflowers decompilation bugs at the time. Luckily, this version of Fernflower can be found in mcp70a. Download mcp70a from the same Minecraft wiki page, and unzip the files. You can find the fernflower.jar file at /mcp70a/runtime/bin/fernflower.jar. Copy this file to where you're storing all of these downloaded files.
  4. LWJGL: If you want to use an authentically janky old version of LWJGL, download LWJGL 2.4.2, which can be found here (download the file named "lwjgl-2.4.2.zip"). Alternatively, download the latest release (LWJGL 2.9.3) from here.
  5. Minecraft .jars: Get a copy of the 1.2.5 client Minecraft .jar, and the 1.2.5 Minecraft server .jar. An easy way to get both files is through the download links on the Minecraft wiki page for 1.2.5. These files are hosted by Mojang.
  6. JDKs: (Possibly optional, but recommended) As Minecraft 1.2.5 and mcp62 were made using an older JDK, I'd recommend using JDK 6 when decompiling & modding with them (or the closest possible substitute). I can only speak for MacOS based JDKs, but when using any JDK newer than Apple's Legacy Java 6 JDK, Forge's patches fail to apply to the decompiled source code. If you're on Windows or Linux, Oracle hosts JDK 6 downloads on this page. If you're on MacOS, you'll need to install Apple's Legacy JDK 6. Note: these versions of Java are likely not secure, use them at your own risk. It might be a good idea to re-install a supported JDK after installing the older one, to make sure that environmental variables or various platform binaries are up to date.

Creating the pre-setup enviroment:

  1. MCP: Unzip mcp62, and move the unzipped folder to your project directory.
  2. Forge: Unzip the Forge source distribution you downloaded, and move the unzipped forge folder to inside of the unzipped mcp62 folder (/mcp62/forge).
  3. Fernflower fix: Copy the "fernflower.jar" file from mcp70a to the same location under mcp62 (/mcp62/runtime/bin/fernflower.jar).
  4. Broken link fix: Inside of the mcp62 folder, navigate to the "conf" folder, and modify the "mcp.cfg" file (/mcp62/conf/mcp.cfg) to remove the line containing "UpdateUrl" (line 124 in mcp62). This link is no longer functional, and MCP will fail upon trying to communicate with it. Removing it prevents MCP from trying to update. I don't think this actually does anything, as /mcp62/conf/mcp.cfg was overwritten with /mcp62/forge/conf/mcp.cfg anyway.
  5. Newline fix: If the OS you're using is not Windows, you may need to convert the line endings in the file /mcp62/forge/conf/astyle.cfg to Unix style line endings (this was an issue for me when using MacOS). Using the program dos2unix is an easy way to do this.
  6. Minecraft .jars: Inside of the mcp62 folder, navigate to the "jars" folder. Copy the Minecraft 1.2.5 server .jar file to this directory, and rename it to "minecraft_server.jar" (/mcp62/jars/minecraft_server.jar). Make a new folder in the "jars" folder, and name it "bin". Copy the Minecraft 1.2.5 client .jar file to this directory, and rename it to "minecraft.jar" (/mcp62/jars/bin/minecraft.jar).
  7. LWJGL files: Unzip the downloaded LWJGL. From the unzipped LWJGL folder, navigate to the "jar" folder, and copy "lwjgl.jar", "lwjgl_util.jar", and "jinput.jar" into the same MCP "bin" folder that the Minecraft client .jar file was copied to (from /lwjgl-(version number)/jar/*.jar to /mcp62/jars/bin/*.jar). From the unzipped LWJGL folder, navigate to the "native" folder. This folder contains all the OS specific binary files that LWJGL depends on. Find the folder corresponding to the name of your OS, and copy it to the MCP "bin" folder (from /lwjgl-(version number)/native/(name of the copied folder) to /mcp62/jars/bin/(name of the copied folder)). Finally, rename this copied folder to "natives" (/mcp62/jars/bin/natives).

Congratulations! You have now finished the pre-setup of a working, ready-to-install Forge 1.2.5 environment! I'd advise making a backup of this folder before doing anything else. I personally compress my finished pre-setup as a 7zip archive file. You do still have to install Forge 1.2.5 to the MCP environment before you start modding with it, but the process is fairly easy. A quick refresher / guide for those who aren't familiar with it:

Installing Forge 1.2.5 to your MCP environment

  1. Start your favoured termal emulator (Command Prompt, MacOS terminal, qterminal etc).
  2. (If you wish to use an older version of Java, as recommend above) Export your JAVA_HOME environmental variable to point to the JDK Home folder you want to use.
  3. From the "mcp62" folder, navigate to the "forge" folder (/mcp62/forge). Navigate to this directory with your open terminal emulator.
  4. If you are using Command Prompt, run the "install.cmd" command file with it. If you are using a bash shell, run the "install.sh" shell script with it (requires Python 2 (probably) to be installed).

The install script should now take care of the rest! After it finishes, you should now have a working Forge & MCP environment! If you don't know how the MCP / Forge 1.2.5 modding system works, I would highly recommend checking out sore era-appropriate tutorials.

Remeber, have fun while modding! Now it is YOURFORGE!

@mojontwins
Copy link

Btw does somebody have tutorials / documentation for this version? I've done a bunch of modloader and base class editing but I'd rather not have to reverse engineer this as well :-)

@seanparko
Copy link

Btw does somebody have tutorials/documentation for this version? I've done a bunch of modloader and base class editing but I'd rather not have to reverse engineer this as well :-)

Hey man, same question I've been asking. The best piece of advice is to sort youtube tutorials by date and to try and find the source files of older mods and see how it's done. I believe that if you look at most of the class files from the Minecraft jar, you can get an elementary understanding of how bits of it work.

In the meantime, if you can find some serious documentation for Minecraft 1.2.5, could you please share it here?

@BSD-x86
Copy link

BSD-x86 commented Aug 17, 2022

For those who has problems with sounds, just download 1.2.5 instance with MultiMC. And then, go open the 1.2.5 instance folder and copy the resources folder to mcp62\jars. Thats the solution that i have.

@mojontwins
Copy link

mojontwins commented Oct 11, 2022 via email

@ISurrealI
Copy link

Use Java 8 if you're on Windows unless you like to mess with stupid windows and oracle issues. And replace forge source code you put in ./mcp/62/forge with this. This fixes the worldMngr patching issue.

@notbrianbob
Copy link

For anyone having issues with getting it working when installed. You have to also copy the natives folder from lwjgl. I got a couple "could not be renamed warnings but I was able to create a small test mod and it seemed to run well, except for no sound. But someone else already pointed to a fix.

@notbrianbob
Copy link

Also saw this in another post. But if you get JAVA_HOME errors, someone said to check system environment variables, go to system -> JAVA_HOME -> Make sure the home variable is set correctly AND has no ';' at the end of it.

@ActivexDiamond
Copy link

This has been a huge help, thanks a lot, man!

@ShadowRocks2
Copy link

long shot but how exacly do i get the JAVA_HOME varible and how do i use it to recompile with cmd

@ShadowRocks2
Copy link

i got jdk 6.45 but i couldnt download without making a buisness account so i got it off internet archive (i verified no viruses) how can i use it to do the de/recompile in cmd

@seanparko
Copy link

long shot but how exacly do i get the JAVA_HOME varible and how do i use it to recompile with cmd

You need to add it to your PATH environment variable (assuming you’re on windows). Your best bet is to google a guide for that, it’s very straightforward.

@ShadowRocks2
Copy link

long shot but how exacly do i get the JAVA_HOME varible and how do i use it to recompile with cmd

You need to add it to your PATH environment variable (assuming you’re on windows). Your best bet is to google a guide for that, it’s very straightforward.

Would this work? https://www.java.com/en/download/help/path.html

@ShadowRocks2
Copy link

ShadowRocks2 commented May 17, 2024

long shot but how exacly do i get the JAVA_HOME varible and how do i use it to recompile with cmd

You need to add it to your PATH environment variable (assuming you’re on windows). Your best bet is to google a guide for that, it’s very straightforward.

disregard last comment, it did work, however now i get this error
error: Source option 6 is no longer supported. Use 8 or later.
error: Target option 6 is no longer supported. Use 8 or later.

@ShadowRocks2
Copy link

got it to work, had to physically install it

@ShadowRocks2
Copy link

uh, how do i start the game from this with the launcher

@seanparko
Copy link

Do you mean eclipse? Slow down bro, you’re firing off stuff without details. When I get home I will explain. Are you using eclipse? You need to go into project settings and make sure the code is Java 1.6 compliment (it defaults to Java 17). Again, explain the problem with more details, I will send more instructions later.

@ShadowRocks2
Copy link

Do you mean eclipse? Slow down bro, you’re firing off stuff without details. When I get home I will explain. Are you using eclipse? You need to go into project settings and make sure the code is Java 1.6 compliment (it defaults to Java 17). Again, explain the problem with more details, I will send more instructions later.

sorry, i was just frustrated and tired, however, i found a much easier way to mod 1.2.5, downloaded client zip of forge for 1.2.5 put its contents in 1.2.5.jar with winrar, deleted meta-inf, and the part nobody mentioned except in a "how to make custom mc versions", in which you need to delete a few lines of code from 1.2.5.json that stops auto download for "unvalidated files", thus letting forge and fml install and work on the main launcher

@seanparko
Copy link

Bro what?!?! This is a guide for CREATING mods for 1.2.5. If you’re just trying to mod the game, use prism launcher (trust me, it will save you so much work).

@ShadowRocks2
Copy link

Bro what?!?! This is a guide for CREATING mods for 1.2.5. If you’re just trying to mod the game, use prism launcher (trust me, it will save you so much work).

T.T well i got it working anyway but thanks for launcher recommend

@Ccronosauruss5247
Copy link

The truth is that I have not understood, maybe it is because of the language barrier, since I speak Spanish. But I wonder if someone could help me, since it hasn't worked for me, and I don't know much about these things either.

Thank you very much

@ShadowRocks2
Copy link

The truth is that I have not understood, maybe it is because of the language barrier, since I speak Spanish. But I wonder if someone could help me, since it hasn't worked for me, and I don't know much about these things either.

Thank you very much

¿Estás intentando jugar 1.2.5 o desarrollar modificaciones para él?

@Ccronosauruss5247
Copy link

Jugar, aunque encontré una alternativa, pero hay muchos mods que no me sirven por eso

@ShadowRocks2
Copy link

Jugar, aunque encontré una alternativa, pero hay muchos mods que no me sirven por eso

Para eso, recomendaría Prism Launcher, ya que realmente ayuda a reproducir las versiones antiguas modificadas y descargarlas; sin embargo, tenga en cuenta que cualquier mod que obtenga manualmente y que no sea compatible con Forge, es posible que deba usar la función Agregar a Minecraft.jar de Prism, para haga esto, edite el perfil, haga clic en versión y a la derecha debería ver "agregar a minecraft.jar", haga clic en él y seleccione el mod.zip que descargó para agregar el mod.

@ShadowRocks2
Copy link

Jugar, aunque encontré una alternativa, pero hay muchos mods que no me sirven por eso

https://prismlauncher.org/download/

@Ccronosauruss5247
Copy link

Gracias, pero... el Prism Launcher no sirve en mi PC, tengo Windows 8.1 . . .

@taisan11
Copy link

Can I add additional optifine or TooManyItems to that environment?

@ShadowRocks2
Copy link

Can I add additional optifine or TooManyItems to that environment?

good luck finding the zip, but it should work, ik 1.4.7 worked

@taisan11
Copy link

good luck finding the zip, but it should work, ik 1.4.7 worked

Where do I put them?

@ShadowRocks2
Copy link

same as forge location if im remembering, if not there, in the minecraft.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment