Improve documentation for creating the eclipse workspace
This commit is contained in:
+9
-34
@@ -1,50 +1,25 @@
|
|||||||
-------------------------------------------
|
source installation
|
||||||
Source installation information for modders
|
|
||||||
-------------------------------------------
|
|
||||||
This code follows the Minecraft Forge installation methodology. It will apply
|
|
||||||
some small patches to the vanilla MCP source code, giving you and it access
|
|
||||||
to some of the data and functions you need to build a successful mod.
|
|
||||||
|
|
||||||
Note also that the patches are built against "unrenamed" MCP source code (aka
|
|
||||||
srgnames) - this means that you will not be able to read them directly against
|
|
||||||
normal code.
|
|
||||||
|
|
||||||
Source pack installation information:
|
|
||||||
|
|
||||||
Standalone source installation
|
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
See the Forge Documentation online for more detailed instructions:
|
See the Forge Documentation online for more detailed instructions:
|
||||||
http://mcforge.readthedocs.io/en/latest/gettingstarted/
|
http://mcforge.readthedocs.io/en/latest/gettingstarted/
|
||||||
|
|
||||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
Step 1: open a command line in the project folder
|
||||||
|
|
||||||
Step 2: Once you have a command window up in the folder that the downloaded material was placed, type:
|
Step 2: run the command: "./gradlew setupDecompWorkspace"
|
||||||
|
|
||||||
Windows: "gradlew setupDecompWorkspace"
|
Step 3: run the command: "./gradlew eclipse"
|
||||||
Linux/Mac OS: "./gradlew setupDecompWorkspace"
|
|
||||||
|
|
||||||
Step 3: After all that finished, you're left with a choice.
|
Step 4: Import project
|
||||||
For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux)
|
|
||||||
|
|
||||||
If you prefer to use IntelliJ, steps are a little different.
|
Step 5: In Eclipse go to: Expanded Run Button -> Run Configurations -> Environment, Add the variable "JAVA_HOME" with the value of "JAVA_MC_HOME" or whatever the location of the JDK version 1.8.0_251.
|
||||||
1. Open IDEA, and import project.
|
|
||||||
2. Select your build.gradle file and have it import.
|
|
||||||
3. Once it's finished you must close IntelliJ and run the following command:
|
|
||||||
|
|
||||||
"gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
|
||||||
|
|
||||||
Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project)
|
Other commands:
|
||||||
|
"gradlew --refresh-dependencies" to refresh local dependencies.
|
||||||
|
"gradlew clean" to reset everything (this does not affect your code) and then start the process again.
|
||||||
|
|
||||||
If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again.
|
|
||||||
|
|
||||||
Should it still not work,
|
|
||||||
Refer to #ForgeGradle on EsperNet for more information about the gradle environment.
|
|
||||||
|
|
||||||
Tip:
|
|
||||||
If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following:
|
|
||||||
"setupDevWorkspace": Will patch, deobfuscate, and gather required assets to run minecraft, but will not generate human readable source code.
|
|
||||||
"setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work.
|
|
||||||
|
|
||||||
Tip:
|
Tip:
|
||||||
When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.
|
When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE.
|
||||||
|
|||||||
Vendored
+7
-7
@@ -17,30 +17,30 @@ set APP_BASE_NAME=%~n0
|
|||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_8_HOME goto findJavaFromJavaHome
|
if defined JAVA_MC_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_8_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_MC_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_8_HOME variable in your environment to match the
|
echo Please set the JAVA_MC_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_8_HOME=%JAVA_8_HOME:"=%
|
set JAVA_MC_HOME=%JAVA_MC_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_8_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_MC_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_8_HOME is set to an invalid directory: %JAVA_8_HOME%
|
echo ERROR: JAVA_MC_HOME is set to an invalid directory: %JAVA_MC_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_8_HOME variable in your environment to match the
|
echo Please set the JAVA_MC_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|||||||
Reference in New Issue
Block a user