User Tools

Site Tools


tutorial:setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:setup [2020/09/05 13:36] – Add a note on ./gradlew idea siglongtutorial:setup [2021/08/05 06:01] – Add Generating Sources heading, because people keep missing it daomephsta
Line 3: Line 3:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-   * A Java Development Kit (JDK) for Java (recommended) or newer [[https://adoptopenjdk.net/]]+   * A Java Development Kit (JDK) for Java 16 (recommended) or newer. Visit [[https://adoptopenjdk.net/]] for installers. 
 +       * If you are professional, you can obtain a JDK from [[http://jdk.java.net/]], which needs to be extracted and have system variables set up manually.
    * Any Java IDE, for example [[https://www.jetbrains.com/idea/download/#section=windows|Intellij IDEA]] and [[https://www.eclipse.org/downloads/|Eclipse]]. You may also use any other code editors, such as [[https://code.visualstudio.com/|Visual Studio Code]].    * Any Java IDE, for example [[https://www.jetbrains.com/idea/download/#section=windows|Intellij IDEA]] and [[https://www.eclipse.org/downloads/|Eclipse]]. You may also use any other code editors, such as [[https://code.visualstudio.com/|Visual Studio Code]].
  
Line 10: Line 11:
  
 ==== Manual Steps ==== ==== Manual Steps ====
-   - Copy the starting files from [[https://github.com/FabricMC/fabric-example-mod/|fabric-example-mod]] (or from [[https://github.com/natanfudge/fabric-example-mod-kotlin|the Kotlin version]], if you wish to use Kotlin,) excluding the ''LICENSE'' and ''README.md'' files - as those apply to the template itself, not necessarily to your mod.+   - Copy the starting files from [[https://github.com/FabricMC/fabric-example-mod/|fabric-example-mod]] (or from [[https://github.com/SmushyTaco/Example-Mod/|the Kotlin version]], if you wish to use Kotlin,) excluding the ''LICENSE'' and ''README.md'' files - as those apply to the template itself, not necessarily to your mod.
    - Edit ''gradle.properties'':    - Edit ''gradle.properties'':
        * Make sure to set ''archives_base_name'' and ''maven_group'' to your preferred values.        * Make sure to set ''archives_base_name'' and ''maven_group'' to your preferred values.
Line 18: Line 19:
    - Happy modding!    - Happy modding!
  
 +=== Generating Sources ===
 You can generate the Minecraft sources for reference (since IDEA already has a decompiler this is only useful for searching through the code) : You can generate the Minecraft sources for reference (since IDEA already has a decompiler this is only useful for searching through the code) :
  Run the ''genSources'' Gradle task. If your IDE doesn't have Gradle integration, then run the following command in the terminal: ''gradlew genSources'' (or ''./gradlew genSources'' on Linux/MacOS).  Run the ''genSources'' Gradle task. If your IDE doesn't have Gradle integration, then run the following command in the terminal: ''gradlew genSources'' (or ''./gradlew genSources'' on Linux/MacOS).
Line 39: Line 41:
  
 === Eclipse === === Eclipse ===
-If you are using Eclipse and you would like to have the IDE run configs you can run ''gradlew eclipse''.+If you are using Eclipse and you would like to have the IDE run configs you can run ''gradlew eclipse''. The project can then be imported as a normal (non-gradle) Eclipse project into your workspace using the 'File' - 'Import...' menu, then 'General' -> 'Existing Projects into Workspace'.
  
 === Visual Studio Code === === Visual Studio Code ===
Line 58: Line 60:
  
 ===== Advice ===== ===== Advice =====
-  * While Fabric API is not strictly necessary for developing mods, its primary goal is to provide cross-compatibility and hooks where the game engine does not, and as such it is highly recommended!+  * While Fabric API is not strictly necessary for developing mods, its primary goal is to provide cross-compatibility and hooks where the game engine does not, and as such it is highly recommended! Even some of the tutorials on the wiki implicitly require Fabric API.
   * Occasionally, with development of fabric-loom (our Gradle build plugin) issues may crop up which require resetting the cache files. This can be done by running ''gradlew cleanloom''. Running ''gradlew %%--%%stop'' can also help with a few rare issues.   * Occasionally, with development of fabric-loom (our Gradle build plugin) issues may crop up which require resetting the cache files. This can be done by running ''gradlew cleanloom''. Running ''gradlew %%--%%stop'' can also help with a few rare issues.
   * Don't hesitate to ask questions! We're here to help you and work with you to make your dream mod a reality.   * Don't hesitate to ask questions! We're here to help you and work with you to make your dream mod a reality.
tutorial/setup.txt · Last modified: 2024/06/30 00:02 by 2600:387:c:6c19::9