SoniEx2
SoniEx2

Reputation: 2044

How do I setup a Minecraft Forge development environment?

I want to start creating awesome Minecraft mods, and it seems that the current way to do so is with Minecraft Forge. I already got Gradle and the JDK installed, but no matter what I do I can't seem to get anything to build.

How can I get a Forge development environment working?

Upvotes: 1

Views: 3591

Answers (2)

user7109736
user7109736

Reputation:

Simple:

Once you have downloaded the Forge .zip for the version that you plan on using, go to the same directory as your "gradlew.bat" file, hold shift-rightclick and open the command prompt.

Type:

gradlew.bat setupDecompWorkspace eclipse

Or if you're running with Intellij Idea (Which I recommend):

gradlew.bat setupDecompWorkspace idea

After that, it'll set up the Workspace as well as the correct coding software package that you wish to be using.

Upvotes: 0

SoniEx2
SoniEx2

Reputation: 2044

After downloading the Forge Mod Development Kit (MDK) archive, it should contain the following files:

forge-somewhere/
├── build.gradle
├── CREDITS-fml.txt
├── eclipse
├── forge-1.10.2-12.18.1.2073-changelog.txt
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── LICENSE-new.txt
├── MinecraftForge-Credits.txt
├── Paulscode IBXM Library License.txt
├── Paulscode SoundSystem CodecIBXM License.txt
├── README.txt
└── src
    └── main
        ├── java
        │   └── com
        │       └── example
        │           └── examplemod
        │               └── ExampleMod.java
        └── resources
            └── mcmod.info

In the README.txt there are instructions on how to set it up, but to put it simple, open a console/terminal in forge-somewhere and run gradle setupDecompWorkspace. It should set up a development environment and then you should be able to run gradle build normally. Note that you have to re-run setupDecompWorkspace for every mod you want to develop/compile.

If you're not using an IDE, or the command fails because of heap memory, you can use gradle setupDevWorkspace instead. This doesn't decompile Minecraft, so you won't be able to check the sources (which you can't without an IDE or something anyway), but it doesn't use nearly as much RAM, which is useful if you're on a lower-end system.

Upvotes: 2

Related Questions