Skip to content

Instantly share code, notes, and snippets.

@NeRdTheNed
Last active October 23, 2024 19:53
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!

@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

@Vlad-Lamela
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.

do you mean copy natives from lwjgl to /jars/bin/natives ?

@uTa4u
Copy link

uTa4u commented Jul 27, 2024

`import net.minecraft.src.forge.IShearable;
^

src\minecraft_server\net\minecraft\src\EntityMooshroom.java:7: error: cannot fin
d symbol
public class EntityMooshroom extends EntityCow implements IShearable
^

symbol: class IShearable
src\minecraft_server\net\minecraft\src\EntitySheep.java:6: error: package net.mi
necraft.src.forge does not exist
import net.minecraft.src.forge.IShearable;
^

src\minecraft_server\net\minecraft\src\EntitySheep.java:8: error: cannot find sy
mbol
public class EntitySheep extends EntityAnimal implements IShearable
^

symbol: class IShearable
src\minecraft_server\net\minecraft\src\EntityTrackerEntry.java:8: error: package
net.minecraft.src.forge does not exist
import net.minecraft.src.forge.ForgeHooks;
^

src\minecraft_server\net\minecraft\src\EntityTrackerEntry.java:9: error: package
net.minecraft.src.forge.packets does not exist
import net.minecraft.src.forge.packets.PacketEntityTrack;
^

src\minecraft_server\net\minecraft\src\GuiStatsComponent.java:10: error: package
net.minecraft.src.forge does not exist
import net.minecraft.src.forge.DimensionManager;
^

src\minecraft_server\net\minecraft\src\ItemTool.java:3: error: package net.minec
raft.src.forge does not exist
import net.minecraft.src.forge.ForgeHooks;`

I did everything according to the guide and used another forge download as person in the comments above said. I'm using jdk 8 with -source and -target being 1.6. Do I need strictly jdk 6? Because another person above mentioned using jdk8 is better on windows fwr. I get A LOT of errors like these. That can't be because of incorrect jdk tho? Since it's straight up missing some packages

@NeRdTheNed
Copy link
Author

NeRdTheNed commented Jul 27, 2024

I did everything according to the guide and used another forge download as person in the comments above said. I'm using jdk 8 with -source and -target being 1.6. Do I need strictly jdk 6? Because another person above mentioned using jdk8 is better on windows fwr. I get A LOT of errors like these. That can't be because of incorrect jdk tho? Since it's straight up missing some packages

Hi @uTa4u, I'd recommend using JDK 6 (possibly 7 would work but 6 is ideal), I've had similar errors when using JDK 8. It's due to some internal quirks of the decompiler changing the output on later JDKs, which breaks some MCP & Forge patches.

@jredfox
Copy link

jredfox commented Aug 29, 2024

Any solution for getting the server mods to work. It throws compile errors with 1.2.5 MCP + Forge latest version. Field not found exceptions in ConsoleCommandHandler.class. Every documentation online either only covers the client or appears to just magically work Do I have to backport the version of forge some?

var24 = this.minecraftServer.worldMngr[var20];

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