Development: Difference between revisions

Content added Content deleted
m (Improved the page)
m (Corrected a few typos)
Line 1: Line 1:
== Introduction ==
== Introduction ==


Everyone can contribute to GTNH in one way or another. One possible way is to expand/improve the source code of the mods. To get started, you first need a vision for what you want to do. If you have no idea you can look through [[https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues|Github issues]] and try to adress some. If you do have a vision and are unsure wether its good or want to hear more opinisions on it you can discuss it with others in a new issue or on discord.
Everyone can contribute to GTNH in one way or another. One possible way is to expand/improve the source code of the mods. To get started, you first need a vision for what you want to do. If you have no idea you can look through [[https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues issues]] and try to address some. If you do have a vision and are unsure whether its good or want to hear more opinions on it you can discuss it with others in a new issue or on discord.


== Getting started ==
== Getting started ==
Line 11: Line 11:
# Create a new GitHub repository and clone it
# Create a new GitHub repository and clone it
# Choose and download a [https://files.minecraftforge.net/net/minecraftforge/forge/ Forge] MDK and extract the contents of the ZIP-archive into the directory, where you cloned your repository to (If you are developing for Minecraft 1.7.10, you can use SinTh0r4s' [https://github.com/GTNewHorizons/ExampleMod1.7.10/releases/tag/latest-packages]-template).
# Choose and download a [https://files.minecraftforge.net/net/minecraftforge/forge/ Forge] MDK and extract the contents of the ZIP-archive into the directory, where you cloned your repository to (If you are developing for Minecraft 1.7.10, you can use SinTh0r4s' [https://github.com/GTNewHorizons/ExampleMod1.7.10/releases/tag/latest-packages]-template).
# Edit your project details (name, version, dependecies, etc.).
# Edit your project details (name, version, dependencies, etc.).
#Execute <code>gradlew setupDecompWorkspace eclipse</code> / <code>gradlew setupDecompWorkspace idea</code> in the root directory of your project
#Execute <code>gradlew setupDecompWorkspace eclipse</code> / <code>gradlew setupDecompWorkspace idea</code> in the root directory of your project
# In Eclipse / IntelliJ IDEA, import your workspace as a Gradle project.
# In Eclipse / IntelliJ IDEA, import your workspace as a Gradle project.
Line 22: Line 22:
# In Eclipse / IntelliJ IDEA, import your workspace as an existing Gradle project.
# In Eclipse / IntelliJ IDEA, import your workspace as an existing Gradle project.
#If the import fails, you may have to adjust the Gradle version and/or buildscript. If you are developing for Minecraft 1.7.10, read [https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/docs/migration.md this guide].
#If the import fails, you may have to adjust the Gradle version and/or buildscript. If you are developing for Minecraft 1.7.10, read [https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/docs/migration.md this guide].
#Execute <code>./gradlew genIntellijRuns</code> if you are using InteliJ to run the project inside your IDE.
#Execute <code>./gradlew genIntellijRuns</code> if you are using IntelliJ to run the project inside your IDE.
# Done.
# Done.


=== Common issues ===
=== Common issues ===
* If even after you executed the <code>gradlw setupDecompWorkspace</code> command your IDE tells you that stuff is missing, try to reload gradle.
* If even after you executed the <code>gradlew setupDecompWorkspace</code> command your IDE tells you that stuff is missing, try to reload gradle.
* You need Java 8 (64 bit) for development. If you have multiple Java versions installed you may need to set the JAVA_HOME environment variable to the location of your Java 8 installation.
* You need Java 8 (64 bit) for development. If you have multiple Java versions installed you may need to set the JAVA_HOME environment variable to the location of your Java 8 installation.


Line 33: Line 33:


==Tools==
==Tools==
All applications that are grouped together can do about the same. This does not mean that you can pick any one of them, as they differ in functionality, style, performace and customizability. It is recommended you look at what they can do and try each one out, so you can decide which application you want to use for which use case.
All applications that are grouped together can do about the same. This does not mean that you can pick any one of them, as they differ in functionality, style, performance and customizability. It is recommended you look at what they can do and try each one out, so you can decide which application you want to use for which use case.


====== Code Editors ======
====== Code Editors ======
Line 42: Line 42:
* [https://atom.io/ Atom]
* [https://atom.io/ Atom]


====== Integrated Development Enviroments ======
====== Integrated Development Environments ======


* [https://www.eclipse.org/ Eclipse] ''Note: as of version 4.17 Eclipse requires Java 11 or newer but you can still get [https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-06/R/ older versions] which support Java 8.''
* [https://www.eclipse.org/ Eclipse] ''Note: as of version 4.17 Eclipse requires Java 11 or newer but you can still get [https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-06/R/ older versions] which support Java 8.''