Masas minecraft modding setup

Kulmapaikasta
Versio hetkellä 27. kesäkuuta 2016 kello 17.40 – tehnyt Masa (keskustelu | muokkaukset) (Created page)
(ero) ← Vanhempi versio | Nykyinen versio (ero) | Uudempi versio → (ero)
Siirry navigaatioon Siirry hakuun

- I have my directory structure like so:

 * minecraft_modding
 * minecraft_modding/1.9.x/
 * minecraft_modding/1.9.x/eclipse
 * minecraft_modding/1.9.x/forge
 * minecraft_modding/1.9.x/minecraft
 * minecraft_modding/1.9.x/mods
  1. After you have those 4 directories under the 1.9.x directory, then you can change to the minecraft_modding/1.9.x/forge directory, extract the forge mdk there and then run the "gradlew setupDecompWorkspace" and "gradlew eclipse" tasks
  2. Once those are finished, change to the workspace (what should be completely empty at this point) in minecraft_modding/1.9.x/eclipse
  3. You can close the welcome screen/tab in Eclipse and change to the Java perspective from the top right, and close the Resources perspective or whatever the default is
  4. Then goto File -> Import -> General -> Existing project into workspace -> Next
  5. Then in "Select root directory" select the minecraft_modding/1.9.x/forge directory (where your mdk stuff is) and click Finish
  6. That should have then added that 'forge' project into your package explorer in Eclipse
  7. Then right click that forge project in the package explorer, select Build path -> Configure build path
  8. On the Libraries tab, check that you have 'JRE System Library' in the list only once (in the past it appeared twice at least for me, and that caused problems, so I had to remove one, save, then they would both vanish, so then I would go back and add it back in once)
  9. Then go to the "Order and Export" tab, hit Select All and then Ok
  10. After that in the package explorer, you can right click -> New -> Java project, give it a name -> Next
  11. Then on the "Source" tab right click on the 'src' dir it has added and select Remove from build path, then on the Projects tab click "Add" and select the 'forge' project, then click Finish
  12. Then from the package explorer, select the src directory under that new project, and hit delete to remove it completely
  13. Then, assuming you have some mod code somewhere ready to be added, right click that new project and select New -> Folder
  14. Then click Advanced -> Link to alternate location, and then browse to the minecraft_modding/1.9.x/mods/modnamehere/src/main/resources and hit Ok
  15. Then the same again, for the minecraft_modding/1.9.x/mods/modnamehere/src/main/java directory, but that one I usually name as 'src' in the "Folder name" field in the eclipse dialog, so that it appears as 'src' in the package explorer too
  16. Then in the package explorer for both the 'resources' and the 'src' directories, right click them and select "Build path" -> "Use as source folded"
  17. At this point you should have all the code stuff set up in eclipse, the final step is editing the run configuration so that you can actually launch the game with the mods
  18. From the top, beside Debug icon, click the down arrow -> Debug configurations
  19. You should see something like forge_Client and forge_Server
  20. Select the forge_Client one, you can name it on the top in the Name field, I usually call it 'Ender Utilities - Client' for mine
  21. On the Main tab everything should be fine (Project: forge and Main class: GradleStart)
  22. On the Arguments tab, I have this in Prorgam arguments: --width 1280 --height 720 --username=masa_
  23. In VM arguments, set the JVM memory as you wish, plus the forge argument: -Xms512M -Xmx1024M -DFORGE_FORCE_FRAME_RECALC=true
  24. Then in the "Working directory", I have "Other" and browse that to the minecraft_modding/1.9.x/minecraft directory in your dir structure
  25. Then finally on the Classpath tab, you want to add all your mod projects to the User Entries section
  26. Click "User Entries", then from the right "Add projects", then make sure to unselect the two "Add exported..." and "Add required..." marks on the bottom, select the project you want on the top, and hit Ok
  27. Then hit Apply on the run configurations window, and you can hit Debug to start minecraft for the first time
  28. After the first time you run the game through that menu, it should then appear under the little down arrow menu next to the Debug icon where you opened that dialog earlier