tutorial:setup
This is an old revision of the document!
Table of Contents
Setting up a mod development environment
Prerequisites
- A Java 8+-compatible JDK (so 8, 9, 10, 11…)
- Please note that, specifically on Java 11, there are issues connecting to our Maven - see this for more information.
Steps
The recommended approach to setting up a development environment is to do the following:
- Copy the starting files from fabric-example-mod, excluding the LICENSE and README.md files - as those apply to the template itself, not necessarily to your mod.
- Edit gradle.properties.
- Make sure to set archives_base_name and maven_group to your preferred values.
- Make sure to update the versions of Minecraft, the mappings and the loader - all of which can be queried through the Fabric website - to match the versions you wish to target.
- Add any other dependencies you plan to use in build.gradle.
- Set up the environment with sources - this will allow working indexing and lookups in many common IDEs.
- IntelliJ IDEA: “./gradlew genSources idea”
- Visual Studio Code: see Setting up Visual Studio Code with Fabric
- Eclipse: Setting up Eclipse with Fabric
- Open the resulting project in your IDE of choice.
- Happy modding!
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!
- As Fabric is in early development, occasionally, with development of fabric-loom (our Gradle build plugin) issues may crop up which require a manual clearing (deleting) of the cache (which can be found in .gradle/caches/fabric-loom). Those will generally be announced as they are identified.
- Don't hesitate to ask questions! We're here to help you and work with you to make your dream mod a reality.
Troubleshooting
Missing sounds
Sometimes, when importing the Gradle project into an IDE, the assets might not download correctly. In this case, run the “downloadAssets” task manually - either using IDEA's built-in menu or by simply running gradlew downloadAssets
.
tutorial/setup.1557560378.txt.gz · Last modified: 2019/05/11 07:39 by asie