Setup Modding Environment - Windows

View previous topic View next topic Go down

Setup Modding Environment - Windows

Post by Ciabatta on Fri Jul 22, 2016 12:54 am

Below is a quick-and-dirty installation guide for setting up the Java JDK, the Forge MDK, and Eclipse.  This is based on a Windows-only installation, with Mac and Linux instructions coming soon (I would appreciate contributions here if possible).  Try to follow these steps for setting up the kind of development environment needed to program our SpookJams Mod goals!


  1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and download the Java SE Development Kit (the topmost one, these days it is version "8u101"),... if you're using Windows 7 or greater, download the EXE file for Windows x64.

  2. Once downloaded, double-click to install it and let the Java JDK installation program run; be sure to make note of WHERE the Java development kit is being installed to... it will likely be in something like "C:\Program Files\Java\jdk1.8.0_101".  Make note of the folder called "bin", we will make use of that shortly.

  3. Once installed, go to your Start Menu, right-click on Computer and select Properties.

  4. In the System Properties screen, click on Advanced System Settings.

  5. In the Advanced System Settings screen, click on Environmental Variables.

  6. In the Environmental Variables screen, go to the System Variables section and look to see if you already have a "Path" variable on the list. 

    If the "Path" variable exists, press Edit. There will already be a file path in the Variable Value field (i.e., "C:\Program Files (x86)\Windows Live\Shared") -- instead of replacing it, you will add a semicolon after it, and then add your Java's JDK bin folder, as well as its JRE bin folder.  The final Variable Value field will read something like:

    C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files\Java\jre1.8.0_101\bin

    If the "Path" variable doesn't exist, press New.  Repeat the steps above to add the Java's JDK and JRE bin folders so that the Variable Value field looks like this:

    C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files\Java\jre1.8.0_101\bin

  7. Once the update to the "Path" variable is complete, press OK and exit the Properties screen.

  8. Open your browser and head over to http://files.minecraftforge.net/.

  9. While we will eventually use Minecraft 1.10.x, most of the latest tutorials are centered around Minecraft 1.9.4, so let's start with that first (for training purposes).  Click on the Minecraft Version 1.9 button and select the 1.9.4 sub-option.

  10. On the download screen, choose to download the Recommended version (as of this writing, it is "1.9.4 - 12.17.0.1976").

  11. Hover over its MDK button ("MDK" stands for "Mod Development Kit") and click on it to download the Forge 1.9.4 MDK file.

  12. Create a brand new folder where you will be keeping all your new coding projects (you can call it "Coding" and create a subfolder for our Spookjams experimental mod (call it "Spookjams"). We want this as a subfolder because you never know if you need to create additional modding projects in the future, including some personal spinoffs from your work with the Spookjams mod.

  13. Once this "Spookjams" folder is complete, empty the contents of the MDK zip file into this folder.  By default, this folder will start off with only three folders ("eclipse", "gradle" and "src"), and only a handful of files include "build.gradle" and "gradlew".

  14. In this folder, create a new Text file called "Setup Workspace.bat" and have it open to a blank Notepad window.  In the window, type the following string:

    gradlew setupDecompworkspace && gradlew eclipse

  15. Save the text file, and then double-click on "Setup Workspace.bat" -- a command prompt will appear with a bunch of extracting and moving text going on.  Let it work its magic in peace, it will close when the entire directory is primed and ready for development work!

  16. Time to install Eclipse, a free, convenient and powerful Java editor!  Go to https://eclipse.org/downloads/ and choose to download "Eclipse IDE for Java Developers" (again, likely the 64-bit version).

  17. Once the Eclipse EXE file is downloaded, run the installation program to have it installed on your machine. 

  18. Once Eclipse is installed, you can open it through your Start Menu.  A Workspace Launcher window will open asking you for the location of your project's Workspace directory.  Click the Browse button to search for the location of your "SpookJams" folder, and once located select its "eclipse" subfolder and press OK.  You'll be returned to the Workspace Launcher, after which press OK there too to fully start Eclipse.

  19. A new Eclipse window will open with a default Project on the left called "MDKExample". For fun, you can open the "src/main/java" folder and look at the "ExampleMod.java" file for an example of what a Java class file looks like.

  20. Congratulations!  You now have a working development environment to program Minecraft 1.9.4 Forge mods!  You may be able to recreate these steps for Minecraft Forge 1.10, but for now you can use this environment as a test bed for any 1.9.4 mod-making tutorials you can find.
    Enjoy! Happy Cia


Last edited by Ciabatta on Fri Jul 22, 2016 12:57 am; edited 1 time in total
avatar
Ciabatta
Admin

Posts : 3885
Join date : 2014-01-03
Age : 27
Location : On the road

RP Character Sheet
Name: Ciabatta Sylvia
Personality Trait: Busy
Character Description:

View user profile http://bigsister.forumotion.com

Back to top Go down

Re: Setup Modding Environment - Windows

Post by Ciabatta on Fri Jul 22, 2016 12:55 am

Also, some of these steps could use some images -- since I don't have Windows, screenshot donations are welcomed! ^^;

_________________
avatar
Ciabatta
Admin

Posts : 3885
Join date : 2014-01-03
Age : 27
Location : On the road

RP Character Sheet
Name: Ciabatta Sylvia
Personality Trait: Busy
Character Description:

View user profile http://bigsister.forumotion.com

Back to top Go down

Re: Setup Modding Environment - Windows

Post by Ciabatta on Fri Jul 22, 2016 1:05 am

Oh, for Windows 10 users, the Advanced System Settings are rather hidden... you can use this guide to figure that part out:

http://www.softwareok.com/?seite=faq-Windows-10&faq=10

Also, for setting the Environmental Path, you can use this video...


_________________
avatar
Ciabatta
Admin

Posts : 3885
Join date : 2014-01-03
Age : 27
Location : On the road

RP Character Sheet
Name: Ciabatta Sylvia
Personality Trait: Busy
Character Description:

View user profile http://bigsister.forumotion.com

Back to top Go down

Re: Setup Modding Environment - Windows

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum