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
tutorial:setup [2024/08/27 13:47] solidblocktutorial:setup [2025/10/23 19:50] (current) – Fix typo in Minecraft Develop*m*ent plugin header gauntrecluse
Line 1: Line 1:
-~~REDIRECT>https://docs.fabricmc.net/develop/getting-started/setting-up-a-development-environment~~+~~REDIRECT>https://docs.fabricmc.net/develop/getting-started/setting-up~~
  
 ====== Setting up a mod development environment ====== ====== Setting up a mod development environment ======
Line 6: Line 6:
  
 ==== Installing JDK ==== ==== Installing JDK ====
-To develop mods, a Java Development Kit (JDK) is required. Visit [[https://adoptium.net/releases.html]] 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.+To develop mods, a Java Development Kit (JDK) is required. Visit [[https://adoptium.net/en-GB/temurin/releases]] for installers.
   * Since 1.20.5, Java 21 or newer is required.   * Since 1.20.5, Java 21 or newer is required.
   * Since 1.18, Java 17 or newer is required.   * Since 1.18, Java 17 or newer is required.
Line 14: Line 14:
 More information about installing Java can be found: More information about installing Java can be found:
   * Fabric Wiki's player tutorial of installing Java for [[player:tutorials:java:windows|Windows]], [[player:tutorials:java:mac|MacOS]] or [[player:tutorials:java:linux|Linux]]   * Fabric Wiki's player tutorial of installing Java for [[player:tutorials:java:windows|Windows]], [[player:tutorials:java:mac|MacOS]] or [[player:tutorials:java:linux|Linux]]
-  * Fabric Documentation's player tutorial of installing Java for [[https://docs.fabricmc.net/zh_cn/players/installing-java/windows|Windows]], [[https://fabricmc.net/wiki/player:tutorials:java:mac|MasOS]] or [[https://docs.fabricmc.net/zh_cn/players/installing-java/linux|Linux]]+  * Fabric Documentation's player tutorial of installing Java for [[https://docs.fabricmc.net/zh_cn/players/installing-java/windows|Windows]], [[https://fabricmc.net/wiki/player:tutorials:java:mac|MacOS]] or [[https://docs.fabricmc.net/zh_cn/players/installing-java/linux|Linux]]
  
 ==== Installing an IDE ==== ==== Installing an IDE ====
  
-Before writing your code, you install have any Java IDE installed, 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]].+Before writing your code, you should have Java IDE (Integrated Development Environment) installed. Such as [[https://www.jetbrains.com/idea/download/?section=windows#community-edition|Intellij IDEA Community Edition]] (recommended) or [[https://www.eclipse.org/downloads/|Eclipse]]. You may also use any other code editors, such as [[https://code.visualstudio.com/|Visual Studio Code]].
  
 If you are not familiar with any of these, we recommend to use Intellij IDEA as that is what most people choose for modding. If you are not familiar with any of these, we recommend to use Intellij IDEA as that is what most people choose for modding.
  
-===== Creatng the project =====+===== Creating the project =====
 > Detailed tutorial can be found on [[https://docs.fabricmc.net/develop/getting-started/creating-a-project|Fabric Documentation]] > Detailed tutorial can be found on [[https://docs.fabricmc.net/develop/getting-started/creating-a-project|Fabric Documentation]]
  
Line 50: Line 50:
 **NOTE:** Don't run the ''idea'' gradle task. It is known to break development environment. **NOTE:** Don't run the ''idea'' gradle task. It is known to break development environment.
  
-=== Installing Minecraft Developent plugin ===+=== Minecraft Development plugin ===
 If you are using IntelliJ IDEA, it is highly recommended to install [[https://plugins.jetbrains.com/plugin/8327|Minecraft Development plugin]], which support automatically generating Fabric projects as well as some mixin related features like inspections, generating accessors/shadow fields, and copying Mixin Target References (JVM Descriptors). If you are using IntelliJ IDEA, it is highly recommended to install [[https://plugins.jetbrains.com/plugin/8327|Minecraft Development plugin]], which support automatically generating Fabric projects as well as some mixin related features like inspections, generating accessors/shadow fields, and copying Mixin Target References (JVM Descriptors).
  
Line 96: Line 96:
   * ''Could not find or load class net.fabricmc.devlaunchinjector.Main: java.lang.ClassNotFoundException''   * ''Could not find or load class net.fabricmc.devlaunchinjector.Main: java.lang.ClassNotFoundException''
   * "no JDK module specified" in the run config   * "no JDK module specified" in the run config
-It seems to be a bug of Intellij IDEA since a recent update 2023.2. To fix, just delete the ''.idea'' folder entirely and then restart Intellij IDEA. The module will be reconstructed. You may need to specify Java versions again. If after restarting there is no run config, you can run ''gradle ideaSyncTask'' then check it again. 
  
-If the issue happens, edit the run config, and try modifying the module (the value for parameter ''-cp'') to other values.+There are several fixes, among which one may be a potential fix: 
 +  * If you're using Intellij IDEA, go to "project strcture" and then select "Modules" tab, then clear all modules. Then reload your gradle project. 
 +  * It seems to be a bug of Intellij IDEA since a recent update 2023.2. To fix, just delete the ''.idea'' folder entirely and then restart Intellij IDEA. The module will be reconstructed. You may need to specify Java versions again. If after restarting there is no run config, you can run ''gradle ideaSyncTask'' then check it again. 
 +  * If you have subprojects, please ensure your subprojects are configured correctly. If the ''build.gradle'' of your subproject exists, check whether the gradle plugin ''maven-publish'' is enabled or applied to it. Try adding ''apply plugin: maven-publush'' in the ''build.gradle'' file, if it is not declared at all. 
 +  * If the issue still happens, edit the run config, and try modifying the module (the value for parameter ''-cp'') to other values.
  
 ==== Minecraft game provider couldn't locate the game ==== ==== Minecraft game provider couldn't locate the game ====
Line 106: Line 109:
   * ''java.lang.RuntimeException: Minecraft game provider couldn't locate the game! The game may be absent from the class path, lacks some expected files, suffers from jar corruption or is of an unsupported variety/version.''   * ''java.lang.RuntimeException: Minecraft game provider couldn't locate the game! The game may be absent from the class path, lacks some expected files, suffers from jar corruption or is of an unsupported variety/version.''
  
-This may be because the project path contains non-ASCII characters that may cause incompatibility. Try move the project to paths without non-ASCII characters, or in the run config of "Minecraft Client" and "Minecraft Server", set "Shorten Command Line" from "@argfile (Java 9+)" to "none".+This may be because the project path contains non-ASCII characters that may cause incompatibility. Try move the project to paths without non-ASCII characters, or in the run config of "Minecraft Client" and "Minecraft Server", set "Shorten Command Line" from "@argfile (Java 9+)" to "none". This also applies to the [[tutorial:datagen_setup|Data Generation]] run config.
  
 +Another potential fix, is to go to Region Settings in the Settings or Contral Panel of Windows, go to Region Settings, and enable "Beta: Use Unicode UTF-8 for worldwide language support", and then reboot.
 ==== "processResources" not run ==== ==== "processResources" not run ====
  
tutorial/setup.1724766474.txt.gz · Last modified: 2024/08/27 13:47 by solidblock