Advertisement
masa-

masa's Forge dev environment 2014-07-19

Jul 19th, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. Main -> Project:
  2. forge
  3.  
  4. Main -> Main class:
  5. net.minecraft.launchwrapper.Launch
  6.  
  7. Arguments -> Program arguments (1.7.10):
  8. --version 1.7 --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --username=masa_ --accessToken FML --userProperties={} --assetIndex 1.7.10 --assetsDir C:/Users/masa/.gradle/caches/minecraft/assets --width 1280 --height 720
  9.  
  10. Arguments -> Program arguments (1.7.2):
  11. --version 1.7 --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --accessToken FML --username masa_ --width 1280 --height 720 --assetsDir "C:/Users/masa/Desktop/minecraft_modding/Minecraft 1.7.2/eclipse/assets"
  12.  
  13. Arguments -> VM arguments:
  14. -Xincgc -Xmx1024M -Xms1024M -Dfml.ignoreInvalidMinecraftCertificates=true
  15.  
  16. Arguments -> Working directory:
  17. Other:
  18. C:\Users\masa\Desktop\minecraft_modding\1.7.10\minecraft
  19.  
  20. JRE:
  21. Project JRE (jre7)
  22.  
  23. -------------------
  24. My directory structure:
  25.  
  26. - Desktop/minecraft_modding
  27. - 1.7.10
  28. - eclipse
  29. - forge
  30. - minecraft
  31. - mods
  32. - mod1
  33. - mod2
  34. - ...
  35.  
  36. * 'eclipse' is the eclipse workspace
  37. * 'forge' is the directory where forge/forgegradle stuff is installed as per usual
  38. * 'minecraft' is the working directory set in eclipse, so saves, screenshots etc go there
  39. * Under 'mods' are my mods, one directory per mod, and they have their own build.gradle scripts there. I also build them there separately.
  40.  
  41. -------------------
  42.  
  43. Forge version update procedure:
  44.  
  45. 1. Go to the main forge dir and run the gradle stuff there
  46. (edit build.gradle for version number, run gradlew setupDecompWorkspace and gradlew eclipse)
  47. 2. Delete the forge project from eclipse
  48. 3. Import a new Java project, select the forge dir as the root, don't copy into workspace
  49. 4. Remove the src dirs from the forge project (Configure Build path, remove src and resources, then remove the src dir from the project)
  50. 5. should be done if stuff hasn't changed too much
  51.  
  52. -------------------
  53.  
  54. Howto (updated 2014-07-16 when updating from 1160 to 1180):
  55.  
  56. 1. Create a new forge dev environment with gradlew setupDecompWorkspace and gradlew eclipse (in the 'forge' directory in my dir structure)
  57. 2. Open eclipse, select an empty dir as the workspace (the 'eclipse' directory in my dir structure)
  58. 3. Import -> General -> Existing project and select the 'forge' directory (NOT the eclipse one under it!), DON'T select the copy project into workspace option
  59. 4. From Build path -> Configure Build Path -> Source tab, remove the two source dirs
  60. 5. Remove the src dir from under the 'forge' project in the package explorer
  61. 6. Create a new run config (Java Application) for the 'forge' project, use the settings above for arguments.
  62. 7. Add the mods one by one by creating new Java projects, and then for each of them, do the following
  63. 8. Remove the default src dir like above.
  64. 9. Then add folders (right click project, New -> Folder) and select the src/main/java (as 'src') and src/main/resources (as 'resources') dirs of the mods,
  65. and then set them as source directories (right click them in the package explorer -> Build Path -> Use as Source Folder).
  66. NOTE: This step depends on the mod's file/directory structure of course.
  67. 10. In Build Paths -> Configure Build Paths, Projects tab, click Add and select the main project ('forge') as a dependency
  68. 11. Create a vanilla and a modded run config. In the modded run config, add the mod projects you want to have in this
  69. run config in Classpath -> User entries (remove the two checkbox ticks).
  70.  
  71.  
  72. ---------------------------------------------------------------------------------------------------------
  73. ---------------------------------------------------------------------------------------------------------
  74. ---------------------------------------------------------------------------------------------------------
  75.  
  76. OLD STUFF BELOW THIS, PLEASE IGNORE
  77.  
  78. Howto (old):
  79.  
  80. 1. Create a new forge dev environment with gradlew setupDecompWorkspace and gradlew eclipse
  81. 2. Open eclipse, select an empty dir as the workspace
  82. 3. Import -> General -> Existing project, select the copy project into workspace option
  83. 4. From Build path -> Configure Build Path -> Source tab, remove the two source dirs
  84. 5. Remove the src dir from under the project in the package explorer
  85. 6. Create a new run config (Java Application), use the settings above for arguments.
  86. 7. Add the mods by creating new java projects, remove the default src dir.
  87. 8. Then add folders and select the src/main/java and src/main/resources dirs of the mods, and then set them as source directories
  88. 9. In Configure build paths select the main project as a dependency
  89. 10. Create a vanilla and a modded run config. In the modded run config, add the mod projects in Classpath -> User entries (remove the two checkbox ticks)
  90.  
  91.  
  92. -----------------
  93.  
  94. Old howto:
  95.  
  96. 1. Create a new forge dev environment with gradlew setupDecompWorkspace and gradlew eclipse
  97. 2. Open eclipse, select the workspace as that eclipse folder under the forge directory
  98. 3. Add the mods by creating new java projects, remove the default src dir.
  99. 4. Then add folders and select the src/main/java and src/main/resources dirs of the mods, and then set them as source directories
  100. 5. In Configure build paths select the main project as a dependency
  101. 6. Create a vanilla and a modded run config. In the modded run config, add the mod projects in Classpath -> User entries (remove the two checkbox ticks)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement