Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mcenderdragon/6c7af2daf6f72b0cadf0c63169a87583 to your computer and use it in GitHub Desktop.
Save mcenderdragon/6c7af2daf6f72b0cadf0c63169a87583 to your computer and use it in GitHub Desktop.
Short command list of what is now needed to setup forge and MDK

If a command breaks, use --no-daemon as the ForgeGradle currently doesn't uses it

Setup MDK (For Modders who want to create a mod)

Running client

  • ./gradlew runClient

Running Server

  • ./gradlew runServer

Setup FORGE (for those wishing to work on forge directly)

  • Clone the Forge Repo
  • ./gradlew setup
  • If it crashes try running it again, as this sometimes helps
  • ./gradlew eclipse
  • this generates the eclipse files
  • you can then import the projects inside the "projects" folder in an existing workspace
  • ./gradlew genIntellijRuns for IntelliJ users
  • this creates the IntelliJ files
  • Setup IntelliJ

For Generating the Patches

  • ./gradlew :forge:genPatches

Running client

Vanilla client:

  • ./gradlew clean:runclient

Forge Client:

  • ./gradlew forge:runclient

Running Server

Forge Server:

  • ./gradlew forge:runserver
@HenryLoenwind
Copy link

Importing into IDE has not changed

um, the best way for eclipse was to run setupDecompWorkspace and then import as gradle project. Not using the "eclipse" target, (That way is not mentioned in the linked document,) So what would be the new target to setup the project so it can be imported without creating an eclipse project that you'd have to manually remove first? For the initial setup it probably wouldn't matter, but when needing to refresh dependencies or upgrade Forge versions there should be a task that does not trash the gradle-based eclipse project...

@mcenderdragon
Copy link
Author

mcenderdragon commented Feb 7, 2019

@HenryLoenwind For Initial eclipse setup I just ran gradlew eclipse 3 times (to make sure the last one finsihes in 5seconds so everything is done) and then imported the folder as existing java project (can also be imported as a gradle project).
For updating simple use:

  • gradlew clean
  • gradlew eclipse --refresh-dependencies --no-daemon (again 2 times so the libs get linked)

@lehjr
Copy link

lehjr commented Feb 14, 2019

for IntelliJ users, it's probably worth noting that you'll want to use the .idea (directory based) configuration rather than the *.ipr (file based) configuration.

@emctague
Copy link

emctague commented Feb 15, 2019

When I perform the setup from the first part (importing into IntelliJ), it doesn't work, showing a missing dependency of net.minecraftforge:forge:1.13.2-25.0.10_mapped_snapshot_20180921-1.13. The gradle sync results also report java.lang.IllegalStateException: ProjectScopeServices has been closed.

Any idea what to do? I've been trying to get the MDK working literally all day long and this is the furthest I've gotten without something breaking.

@hypehuman
Copy link

hypehuman commented Apr 22, 2019

It looks like clean:runclient has been renamed to clean_client and forge:runclient has been renamed to forge_client. Furthermore, forge_client fails for me, saying Error: Could not find or load main class net.minecraftforge.userdev.LaunchTesting. clean_client works fine.

@henryfoster
Copy link

Is it possible to run the mod directly in eclipse instead of the commandline?

@CplPibald
Copy link

Is developing mods without an IDE no longer supported? eg: editing source in vim and then building with gradle commands?

I used to use gradle setupDecompWorkspace and it would set up everything I needed including decompiled source to the build\tmp directory. Does gradle eclipse replace that?

@shubhayshah
Copy link

thank you!!!! gradlew runClient helped me run Minecraft Forge!!!
look...

image

@xCOOLxGUYx
Copy link

for creating mods I did exactly what you said and eclipse still cant find the net libraries

@xCOOLxGUYx
Copy link

I REALLY need a way to figure this out, im tired and haven't gotten even remotely close to being able to make the simplest mod because of this damn way they have everything set up. Like why cant it be like visual studio where you create the project and your good to go

@mcenderdragon
Copy link
Author

I recommend the forge discord if you have problems.

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