Creating a Minecraft Mod Using MinecraftForge Welcome to Creating a Minecraft Mod Using MinecraftForge. The purpose of this tutorial is to show you what is involved in setting up the environment and building a mod. Put on our toolbelt Creating a Minecraft mod requires the JDK, an SDK and/or a mod loader.
There are a handful of options to create a mod for Minecraft, but for this tutorial, MinecraftForge and Eclipse will be used. One of the nice things about Java is that it's available on many platforms, so this tutorial is applicable to the platform you are working in. Windows 7+ or Mac OS X 10.8+ are recommended. Install these first:. (Use the.jar under 'Minecraft for Linux/Other' not.app on Mac to be able to use with JDK 1.8). (8u45 at time of writing).
(Luna version at time of writing) Installing Forge Download the recommended installer and src for (11.14.1.1334 at time of writing) Prior to installing Forge, you will need to run Minecraft 1.8 at least once. Forge will also remind you of this if you forget.
Run the Minecraft launcher (NOTE: as a reminder, if you are on Mac OS X, it is recommended to use the minecraft.jar for this tutorial, which is the Linux/Other download of Minceraft. Not the.dmg and.app.) Save Profile then click Play. Once Minecraft has fully launched, you can close it. Now install Forge. Running the Forge installer, you will be prompted to install client, server, or extract.
For the intents of this tutorial, only the client is needed. Setting Up A Forge Project Now that Forge is installed, extract the forge source zip file (not to be confused with the Extract option from the installer) to a desired location. This is where the majority of work on the mod will be done.
Also feel free to rename the folder to the name of your mod. For this tutorial, forge-mod will be used. The Forge SDK uses an open source build automation tool called gradle. If you are already familiar with gradle, great. If not, do not worry, it is fairly simple to use as long as you are comfortable using the command line. Now on to generating the Eclipse workspace. Open a command prompt (Cmd.exe or Terminal.app) and cd to the forge source folder from earlier.
$ cd forge-mod To generate the workspace, use the gradlew build script ( gradlew.bat on Windows): $./gradlew setupDecompWorkspace eclipse This command will link with Minecraft and create the appropriate Eclipse workspace files. You are now ready to begin work on your mod in Eclipse. Creating MyMod With Eclipse Launch Eclipse, and if this is the first time launching it, you will be prompted to select a workspace when it starts. If you don't get the workspace prompt, select File - Switch Workspace - Other.
To bring up the dialog. The Eclipse workspace is in the forge-mod/eclipse folder. You can either type in the path to it, or click Browse. And navigate to choose the eclipse folder that is in the root of forge-mod. You should now see a window that looks something like this (expand the Minecraft node in Package Explorer): Forge includes an ExampleMod class you may use as reference. It is not used in this tutorial, so you may remove it if you like. Right-click on src/main/java in Package Explorer and choose New - Package: Java recommends using the reverse-domain naming convention, so call the package com.mymod.tutorial then click Finish.
You now have an empty package. This is where all the source code for the mod will go. Create the main class for MyMod. Right-click on com.mymod.tutorial in the Package Explorer and choose New - Class: Java recommends camel-case naming for classes, so let's name the class MyMod then click Finish. Your workspace should now look like this: Now it's time to add strings to the MyMod class that will be used to register the mod with Forge. Add these to the MyMod class.
Version = '1.0 ' group = 'com.mymod.tutorial ' archivesBaseName = 'mymod ' Now you can build the jar file and test it out. In a cmd prompt, run the gradlew script with build and jar as arguments: $./gradlew build jar If there were no errors, you should now have a.jar file named mymod-1.0.jar in forge-mod/build/libs.
Creating a Minecraft mod requires the JDK, an SDK and/or a mod loader. Not.app on Mac to be able to use with JDK 1.8); Java JDK 8 (8u45 at time of writing). How to install Minecraft mods on a Mac My most popular post of all time by far is a documentation page about how to install Minecraft mods on a Mac. Nothing else I’ve ever written has come anywhere close to the popularity of that post.
In order for Forge to load the mod, it needs to be copied to the mods folder Forge creates in the.minecraft folder. The.minecraft folder location depends on your OS: OS Path Windows%appdata%.minecraft Mac OS X /Library/Application Support/minecraft (If there is no mods folder, create one.) Once your.jar has been copied, launch Minecraft. Make sure you have the Forge profile selected before you click Play. After you click Play and Minecraft launches, there should be a Mods button in the main menu.
Clicking that will list the mods Forge has loaded. You should now see MyMod in that list: Congratulations!
You just created and ran a Forge mod. EXTRA: Add JSON dependency SteelSeries Engine 3 GameSense™ events are formatted using JSON. So it is recommended to use the latest JSON library for Java. You can get the latest JSON.jar from the. Put the JSON.jar file in a jars folder in the root of forge-mod: Next, add the dependency to build.gradle and regenerate the Eclipse workspace.
Open up the build.gradle file again, and find the top-level section for dependencies (NOT dependencies under buildscript).
This was a frustrating process for me, but I finally got it. Watch this video. It’s good and may give you everything you need. If not (there were a few extra things I needed to do) read on. Download minecraft forge. Goto and download the ‘Installer’ for the most recent recommended version (1.6.4 at this time of writing). To skip the adds, click the ‘.’ beside the word ‘Installer’ on the ‘1.6.4-Recommended’ and download the jar file (it will save to your downloads directory).
Save old profile. The next thing we are going to do is save your current minecraft configuration, before blowing it all away with the new minecraft forge client.
Open up your ‘finder’ and click ‘Go to Folder’ Then type in exactly exactly what you see below into the textfield and hit the ‘Go’ button. This will take your to your minecraft application directory where your profile is stored (sorry, I forget to mention you will need to install minecraft on your Mac first before installing forge). Once there drag and drop these files and folders to your desktop.
Then blow everything else away in the directory. Create forge profile. Now start your minecraft application. This is going to download the latest minecraft version. Now here is where things differ from the video.
If your minecraft client version (1.7.3), is different from the latest forge version (1.6.4), it’s not going to work (at least not yet). We need to create a 1.6.4 profile (the same version as forge) and then things will work. So if your latest client version differs from the forge version, create a new profile matching them up. For example to to create a 1.6.4 profile, click ‘Profile Editor’ at the top of your login screen. Then click ‘New Profile’. Then file in the profile name (pick whatever you want, maybe put 1.6.4 in there so you know the version), and then select ‘release 1.6.4’ for the Use Version, and then ‘Save Profile’.
Now you have a compatible client that is going to work with your forge! No you can go back to your login screen, select your new 1.6.4 profile, and login. Click ‘Quit Game’ and shut down your minecraft launcher (Command-Q) or right click quit in your application toolbar. Install forge client Drop the files we dragged to the desktop earlier, back into the minecraft application folder we deleted everything from earlier. Select ‘Apply to All’ and then ‘Replace’ Then double click your minecraft forge jar file that we downloaded at the start (downloads directory). If you get this warning message Open your ‘Finder’ and go to your ‘Downloads’ directory manually and ‘right-click’ on the jar file and select open The click ‘Open’ to run the installer Click install client, and make sure that the path in the install directory points to the directory where we stored all your profile stuff. It should look something like this: We are almost there!
You should then see a completion window that says ‘Successfully installed client profile ’ 5. Create client forge profile. Open up minecraft. In the profile areas, a profile option should now appear! Click the ‘Play’ button. And congrats! You should be in.
You can tell your are running forge by the data in the bottom left hand corner. Installing mods. Forge mods go in the ‘mods’ folder in that directory we where looking at earlier where we did all our profile stuff. This is where you put your forge mods. That’s it for now!
Happy forging! Hi, thank you for a clear, easy-to-follow instructional on this, I’m another parent trying to keep the boy child happy! Unfortunately, no matter how many times we have deleted minecraft & forge and reinstalled following explicit instructions, it still crashes. We’ve tried various mods so I am pretty sure it’s not the mods we are using. We are missing a step, a file, or program somewhere in the process (Mac users) Do we need the “Unarchiver” app, or some other similar app? Whenever we install forge no desktop icon appears and it can only be found by searching Finder and is only listed in the downloads folder, nowhere else. I hope these ramblings make sense and I hope you can help me figure out what I’ve missed because I’m not sure how many times I can listen to, “Mom, did you figure it out yet?” or “Mom, all my other friends did it easy, I wish we didn’t have a Mac!” Lol!.
JR Mar 28, 2014 @ 12:26:42. Would it be awkward to say I love you?
LOL honestly though I managed to get Forge installed and even some mods but it was a total PIA of watching multiple videos, different blogs/forums, and then lots of confusion. I love that everything is here in one spot now when I install on our other mac I can just come here ? Do you know if I can install multiple versions of Forge one one computer? There are some mods for 1.6.4 my daughter wants to use and some for 1.7.2 she wants. JR Apr 22, 2014 @ 02:51:43. I would need to see the error message to help diagnose Ann. But here is something to look for. You see the name of the file you typed above?
There is a space after the numbers 965. Forge-1.6.4-9.11.1.965- universal-2.jar Not sure if you accidentally added a space to the file name, or just typed it that way when you left the message. But the jar file should have no spaces. If that doesn’t work, try starting again from the beginning. There may have been something that got messed up as you were doing it. But if you can give me an error message, I could help you more.
Cheers – Jonathan. Angela Mar 24, 2018 @ 14:41:57. I am struggling with this as well.
I made it through step 3 and can’t install Forge. I get the error: The Java JAR file “forge.jar” could not be launched. Check the Console for possible error messages. I updated to the latest java per your link (thanks for that).
Not sure where to go next. I have tried to OPEN WITH and use the Archive Utility, and it creates a new folder with a lot of files, but non of them seem to be the executable file to start Forge. I am running OS X Mavericks and Minecraft 1.7.10. JR Jul 19, 2014 @ 03:26:36.
OK – this is really beginning to bug me. Too many people are struggling with this. Let’s try this. What we need to do, is see what that java console is saying. There is some error message, that is we can just see it, we can figure this out.
Can someone who has run into this error try the following: 1. Open a ‘terminal’ session. Navigate to the directory containing the jar file. Type java Fill in the above with the name of the jar file we are trying to execute. And tell me what error message you see. Then we can try to solve this once and for all.
Cheers – Jonathan. dwb Jul 19, 2014 @ 18:07:36. I believe this is what you requested.