tutorial:setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:setup [2020/02/22 15:34] – [Advice] Fix double dash jamieswhiteshirt | tutorial:setup [2022/09/10 05:04] – daomephsta | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | + | * A Java Development Kit (JDK) for Java 17 (recommended) or newer. Visit [[https://adoptium.net/releases.html]] for installers. | |
- | * A Java Development Kit (JDK) for Java 8 (recommended) or newer [[https://adoptopenjdk.net/]] | + | * If you are professional, |
* Any Java IDE, for example [[https:// | * Any Java IDE, for example [[https:// | ||
+ | * If you are not familiar with any of these, we recommend to use Intellij IDEA as that is what most people choose for modding. | ||
- | ===== Mod Startup | + | ===== Mod Setup ===== |
- | There are two main ways to make a new mod for Minecraft based on Fabric. You can either manually download fabric-example-mod and setup by yourself, or use automatic tools for you. | + | |
==== Manual Steps ==== | ==== Manual Steps ==== | ||
- | - Copy the starting files from [[https:// | + | - Copy the starting files from [[https:// |
- Edit '' | - Edit '' | ||
* Make sure to set '' | * Make sure to set '' | ||
- | * Make sure to update the versions of Minecraft, the mappings | + | * Make sure to update the versions of Minecraft, the mappings, the loader |
* Add any other dependencies you plan to use in '' | * Add any other dependencies you plan to use in '' | ||
- Import the build.gradle file to your IDE. You may refer to the next section for specific IDE's. | - Import the build.gradle file to your IDE. You may refer to the next section for specific IDE's. | ||
- Happy modding! | - Happy modding! | ||
- | You can generate the Minecraft | + | === Fabric Mod ID Change === |
- | Run the '' | + | As of Minecraft |
- | | + | |
=== IntelliJ IDEA === | === IntelliJ IDEA === | ||
If you are using IntelliJ IDEA by JetBrains, please follow these steps: | If you are using IntelliJ IDEA by JetBrains, please follow these steps: | ||
- | - Run '' | + | - In the IDEA main menu, select |
- | - In order to run/debug your project, | + | - Select the project's build.gradle file to import the project. |
+ | - After Gradle is done setting up, close (File -> Close Project) and re-open the project | ||
+ | - (If the run configurations still don't show up, try reimporting the Gradle | ||
+ | |||
+ | //Optional, but recommended//: | ||
+ | By default, IntelliJ delegates | ||
+ | - Open the 'Gradle Settings' | ||
+ | - Change the 'Build and run using' and ' | ||
+ | |||
+ | Unfortunately, it is currently impossible to set an IDE-wide default for the 'Build and run using' and 'Run tests using' | ||
+ | |||
+ | **NOTE:** Don't run the '' | ||
+ | |||
+ | If you are using IntelliJ IDEA you can use the [[https:// | ||
+ | This plugin adds support | ||
+ | generating accessors/ | ||
+ | You can install it using IntelliJ' | ||
+ | then clicking the Marketplace tab and searching for Minecraft. | ||
+ | |||
+ | **NOTE:** The default template in the mcdev plugin blindly uses the latest unstable version of the loom. Use with caution. | ||
=== Eclipse === | === Eclipse === | ||
- | If you are using Eclipse and you would like to have the IDE run configs you can run '' | + | If you are using Eclipse and you would like to have the IDE run configs you can run '' |
=== Visual Studio Code === | === Visual Studio Code === | ||
- | If you are using VSCode | + | If you are using VSCode, please follow [[tutorial: |
- | ==== Generator | + | ===== Generating Minecraft Sources ===== |
- | You may also use [[https:// | + | Reading the Minecraft source is an essential part of modding. |
- | - Download latest release | + | Unfortunately, we can't publish the Minecraft source because |
- | - Make a new directory, then run a command shell there and type '' | + | You need to generate |
- | - After letting | + | |
- | | + | |
+ | To generate the Minecraft source. run the '' | ||
+ | If your IDE doesn' | ||
+ | It can take a while depending on your computer power. | ||
+ | You may need to refresh gradle after running the task. | ||
+ | |||
+ | See [[tutorial: | ||
===== Getting started ===== | ===== Getting started ===== | ||
Line 44: | Line 66: | ||
===== 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! |
* Occasionally, | * Occasionally, | ||
+ | * Keep up with the latest Loom version (which is defined in '' | ||
+ | * Keep up with the latest Gradle version, which can be defined in '' | ||
+ | * Different Gradle versions require different Java versions. Usually latest Gradle supports the recommended Java version 17. | ||
+ | * If you're developing mods for old version Minecraft, besides changing '' | ||
* 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. | ||
Line 51: | Line 77: | ||
==== Missing sounds ==== | ==== Missing sounds ==== | ||
- | |||
Sometimes, when importing the Gradle project into an IDE, the assets might not download correctly. In this case, run the '' | Sometimes, when importing the Gradle project into an IDE, the assets might not download correctly. In this case, run the '' | ||
+ | ===== What's Next? ===== | ||
+ | Create your first [[tutorial: |
tutorial/setup.txt · Last modified: 2024/07/04 16:31 by mineblock11