This is an unofficial guide to setting up a development workspace for Fabric, a new, open-source modloader by asiekierka. Fabric's main selling point over more popular modloaders such as Forge is that Fabric mods are designed to work between multiple Minecraft versions. The reason for the creation of this guide is that, being Fabric is so new, there isn't much documentation on it yet. I've spent quite a few hours today just trying to set up my project, so I thought that a more comprehensive guide may help other modders trying out Fabric for the first time.
I am aware that Asie already has an "official" tutorial on how to set up Fabric, found here, but I found it to be missing a few key bits of information here and there, especially those concerning mod developers.
Setting up Fabric:
When you ready to install Fabric, complete the following steps:
Create a new, empty folder. (NOTE: Fabric versions prior to v0.2.0.64 do not support spaces in the folder's path. If there is a space in the path to the folder, any Fabric mods you attempt to create in your IDE will fail to load properly. To fix this, update to Fabric v0.2.0.64 or above).
Either create a fork of Asie's sample Fabric mod repository or click "Clone or download > Download ZIP" to download the repo's contents onto your computer.
Place the contents in the folder you have just created.
Open the build.gradle file in a text editor such as Notepad++. Once it's open, you should modify the "archivesBaseName" and "version" values to the values you want.
Open a Command Prompt window and navigate to the folder using the command "cd <path to folder>". Once there, run the "gradlew genSources idea" command to set up a workspace made for IntelliJ IDEA. If you use Eclipse, you can run the "gradlew genSources eclipse" command. If you wish to use Visual Studio as your IDE, follow this tutorial instead.
Once Gradle is finished building the workspace, it should automatically open in IDEA. If it doesn't, you can simply double-click on the .ipr file with the same name as the directory to open the project in IDEA.
Launching Minecraft in your development environment:
If you have followed the above steps, you should be able to launch the game right away in IDEA using the "Minecraft Client" and "Minecraft Server" run configurations.
If your mod fails to load without any errors being logged, be sure that you have updated Fabric to v0.2.0.64 or newer, and to be even more cautious, double-check that there are no spaces in the path to the project directory.
Building your mod:
Similar to building mods with Forge, when you are ready to package your mod and obtain its .jar file, navigate to your project's folder in a Command Prompt window (using the "cd" command to change directories) and run the command "gradlew build". Once it's completed, you should see a new "build" folder in your project directory. Find the "libs" folder inside of "build", and your packaged .jar file will be in there.
Updating the version of Fabric you're using in your project:
Because Fabric takes advantage of Gradle, you can easily update the mapping and loader versions you are using in your project. However, the process can be confusing if you haven't done it in a while. Open up your build.gradle file in your IDE, change the versions to the ones you want to update to, then save the file. Once it's saved, navigate to your project directory in the Command Prompt, run the command "gradlew genSources idea" again, and simply wait for it to finish. This will update your project to use the versions of Fabric that you specified.
Launching Minecraft in MultiMC:
Currently, the only way to launch Minecraft with Fabric installed outside of an IDE is to use MultiMC. Many people already use MultiMC, but if you don't, you can find it here. Install it before proceeding to the next step.
Once you have MultiMC installed, go the Fabric downloads page and select the mapping and loader versions that you need. Once you pick the versions you want, click on the "Copy MultiMC instance url" button to save the download link of the correct Fabric MultiMC instance to your clipboard. Open up MultiMC and select the "Add instance" button in the top-left. Click on the "Import from ZIP" option and paste the link you just saved into the textbox. Give the instance a name and click the "OK" button when you are done. Before you can start Minecraft though, you need to install the Fabric API separately. This will cause crashes to occur if you have not completed the following step with Fabric mods installed. Before starting Minecraft, click on this link to be taken to the Fabric API's Maven page. Click on the latest version of the API and select the first .jar file listed. In my case, it would be this one:
This will download that version of the Fabric API as a .jar file. Place it in your MultiMC instance's "mods" folder alongside any other mods before running the game. You can click on "instance folder" in MultiMC then double-click into the ".minecraft" directory for easy access to the mods folder. Once you are finished with this step, you can launch Minecraft by simply clicking the "Launch" button in MultiMC.
Video tutorial:
Here's a video made by ScottoMotto showing the installation of Fabric:
Need more help?
If you're like me, you probably have no idea what I just said and might have a few questions. You can join Fabric's Discord server here, where people a lot more knowledgeable than myself can help you out.
NOTE: I do plan on adding some basic API functions to this guide once I have played around with Fabric a bit.
Feel free to leave any improvements or suggestions you have for this guide below.
Also a video tutorial if anyone that comes across this thread needs it to understand things better besides whats detailed above, try ScottoMotto who released one not too long ago.
Also a video tutorial if anyone that comes across this thread needs it to understand things better besides whats detailed above, try ScottoMotto who released one not too long ago.
Thanks! I'll definitely add that video to the OP as well, as some people like to see visuals rather than reading a text guide.
I have learned that Fabric now supports the Eclipse IDE in addition to IDEA and Visual Studio. I have added the command to set up a Fabric Eclipse project in the "Setting up Fabric" section.
Hello, I just saw that Fabric has it's own category on Curseforge. I was wondering if a Rift or Liteloader one had been considered once 1.13 Forge comes so it's not so complicated to find mods for those on the site.
I know this isn't the right place to post this, but I was wondering if someone could acknowledge this as a request at least for the team that does the CurseForge site. I didn't know where else to post this and due to Rift/Fabric only having so many places to acknowledge such information or to ask a Moderator for a request I thought I'd ask here.
(I know Liteloader has its own site for mods and no 1.13 support yet, but for the purpose of accessibility for those that host on Curseforge maybe, and Rift I don't think hosts it's mods anywhere else legitimately (because everywhere else I've seen Rift is on mod repost sites doing their thing of course, but Fabric you can't get on mod repost sites so that's a good thing at least, but from what I've seen searching for Rift generically just to see if any happened to (I never use mod repost sites but was curious how much 'traction' Rift has gotten since it's been available like with Liteloader, or if they only hosted Forge mods only)), similar to Fabric hosting from what I know of only on Curseforge which works for me .)
Just an idea is all, But due to Fabric getting one, I thought modloaders that have their own would benefit a category for users looking for mods that support them with quick access once 2 or 3 are likely to be available for 1.13 and knowing where to find them (besides dependencies existing I know). Not disappointed if it isn't to happen. I'm at least excited Fabric got a category and Datapacks have the Customization tab for 1.13/1.14 to call their own.
I just tried to follow your tutotial and faced several issues.
I cloned 3 project from the repository: fabric, fabric loom and fabric example.
I blocked at "Setting up Fabric" the step : "Open a Command Prompt window and navigate to the folder using the command "cd <path to folder>". Once there, run the "gradlew genSources idea" command to set up a workspace made for IntelliJ IDEA".
After i finished cloning, i went into the "fabric-exemple" folder and runned your command.
I got :
zsh: command not found: gradlew
I didnt know about gradle so i installed it and runned again, same result.
When i run only "gradle genSources idea" i get a build fail:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
If you don't get any responses by the Moderator in general or due to the Minecraft Forums archiving I'd say go to the Fabric Discord and they can help you out.
I just tried to follow your tutotial and faced several issues.
I cloned 3 project from the repository: fabric, fabric loom and fabric example.
I blocked at "Setting up Fabric" the step : "Open a Command Prompt window and navigate to the folder using the command "cd <path to folder>". Once there, run the "gradlew genSources idea" command to set up a workspace made for IntelliJ IDEA".
After i finished cloning, i went into the "fabric-exemple" folder and runned your command.
I got :
zsh: command not found: gradlew
I didnt know about gradle so i installed it and runned again, same result.
When i run only "gradle genSources idea" i get a build fail:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
archivesBaseName = project.firstmod
version = 1.0
group = project.maven_group
minecraft {
}
Just changed project.version by 1.0 and project.archive_name by project.firstmod.
I'm developper but very new to minecraft modding, gradle and fabric. I couldn't find any tutorial but your to use fabric so
i really count on it .
that looks like when you installed gradle you may have forgotten to add the gradle dir to your environmental Path
Linux & MacOS users
Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:
$ export PATH=$PATH:/opt/gradle/gradle-5.4.1/bin
Microsoft Windows users
In File Explorer right-click on the This PC (or Computer) icon,
then click Properties -> Advanced System Settings -> Environmental Variables.
Under System Variables select Path, then click Edit.
Add an entry for the bin forlder in your gradle installation fordler eg. "C:\Gradle\gradle-5.4.1\bin."
Click OK to save.
Step 4. Verify your installation[/header]
Open a console (or a Windows command prompt) and run gradle -v to run gradle and display the version, e.g.:
Hello everyone,
This is an unofficial guide to setting up a development workspace for Fabric, a new, open-source modloader by asiekierka. Fabric's main selling point over more popular modloaders such as Forge is that Fabric mods are designed to work between multiple Minecraft versions. The reason for the creation of this guide is that, being Fabric is so new, there isn't much documentation on it yet. I've spent quite a few hours today just trying to set up my project, so I thought that a more comprehensive guide may help other modders trying out Fabric for the first time.
I am aware that Asie already has an "official" tutorial on how to set up Fabric, found here, but I found it to be missing a few key bits of information here and there, especially those concerning mod developers.
Setting up Fabric:
When you ready to install Fabric, complete the following steps:
Launching Minecraft in your development environment:
If you have followed the above steps, you should be able to launch the game right away in IDEA using the "Minecraft Client" and "Minecraft Server" run configurations.
If your mod fails to load without any errors being logged, be sure that you have updated Fabric to v0.2.0.64 or newer, and to be even more cautious, double-check that there are no spaces in the path to the project directory.
Building your mod:
Similar to building mods with Forge, when you are ready to package your mod and obtain its .jar file, navigate to your project's folder in a Command Prompt window (using the "cd" command to change directories) and run the command "gradlew build". Once it's completed, you should see a new "build" folder in your project directory. Find the "libs" folder inside of "build", and your packaged .jar file will be in there.
Updating the version of Fabric you're using in your project:
Because Fabric takes advantage of Gradle, you can easily update the mapping and loader versions you are using in your project. However, the process can be confusing if you haven't done it in a while. Open up your build.gradle file in your IDE, change the versions to the ones you want to update to, then save the file. Once it's saved, navigate to your project directory in the Command Prompt, run the command "gradlew genSources idea" again, and simply wait for it to finish. This will update your project to use the versions of Fabric that you specified.
Launching Minecraft in MultiMC:
Currently, the only way to launch Minecraft with Fabric installed outside of an IDE is to use MultiMC. Many people already use MultiMC, but if you don't, you can find it here. Install it before proceeding to the next step.
Once you have MultiMC installed, go the Fabric downloads page and select the mapping and loader versions that you need. Once you pick the versions you want, click on the "Copy MultiMC instance url" button to save the download link of the correct Fabric MultiMC instance to your clipboard. Open up MultiMC and select the "Add instance" button in the top-left. Click on the "Import from ZIP" option and paste the link you just saved into the textbox. Give the instance a name and click the "OK" button when you are done. Before you can start Minecraft though, you need to install the Fabric API separately. This will cause crashes to occur if you have not completed the following step with Fabric mods installed. Before starting Minecraft, click on this link to be taken to the Fabric API's Maven page. Click on the latest version of the API and select the first .jar file listed. In my case, it would be this one:
This will download that version of the Fabric API as a .jar file. Place it in your MultiMC instance's "mods" folder alongside any other mods before running the game. You can click on "instance folder" in MultiMC then double-click into the ".minecraft" directory for easy access to the mods folder. Once you are finished with this step, you can launch Minecraft by simply clicking the "Launch" button in MultiMC.
Video tutorial:
Here's a video made by ScottoMotto showing the installation of Fabric:
Need more help?
If you're like me, you probably have no idea what I just said and might have a few questions. You can join Fabric's Discord server here, where people a lot more knowledgeable than myself can help you out.
NOTE: I do plan on adding some basic API functions to this guide once I have played around with Fabric a bit.
Feel free to leave any improvements or suggestions you have for this guide below.
Mapping and Modding rules | Global rules
Great thread for a quick start guide.
Also a video tutorial if anyone that comes across this thread needs it to understand things better besides whats detailed above, try ScottoMotto who released one not too long ago.
Niche Community Content Finder, Youtuber, Modpack/Map Maker, Duck
Forum Thread Maintainer for APortingCore, Liteloader Download HUB, Asphodel Meadows, Fabric Project, Legacy Fabric/Cursed Fabric, Power API, Rift/Fabric/Forge 1.13 to 1.17.
Wikis I Maintain: https://modwiki.miraheze.org/wiki/User:SuntannedDuck2
Thanks! I'll definitely add that video to the OP as well, as some people like to see visuals rather than reading a text guide.
Mapping and Modding rules | Global rules
Your very welcome.
Niche Community Content Finder, Youtuber, Modpack/Map Maker, Duck
Forum Thread Maintainer for APortingCore, Liteloader Download HUB, Asphodel Meadows, Fabric Project, Legacy Fabric/Cursed Fabric, Power API, Rift/Fabric/Forge 1.13 to 1.17.
Wikis I Maintain: https://modwiki.miraheze.org/wiki/User:SuntannedDuck2
I have learned that Fabric now supports the Eclipse IDE in addition to IDEA and Visual Studio. I have added the command to set up a Fabric Eclipse project in the "Setting up Fabric" section.
Mapping and Modding rules | Global rules
Hello, I just saw that Fabric has it's own category on Curseforge. I was wondering if a Rift or Liteloader one had been considered once 1.13 Forge comes so it's not so complicated to find mods for those on the site.
I know this isn't the right place to post this, but I was wondering if someone could acknowledge this as a request at least for the team that does the CurseForge site. I didn't know where else to post this and due to Rift/Fabric only having so many places to acknowledge such information or to ask a Moderator for a request I thought I'd ask here.
(I know Liteloader has its own site for mods and no 1.13 support yet, but for the purpose of accessibility for those that host on Curseforge maybe, and Rift I don't think hosts it's mods anywhere else legitimately (because everywhere else I've seen Rift is on mod repost sites doing their thing of course, but Fabric you can't get on mod repost sites so that's a good thing at least, but from what I've seen searching for Rift generically just to see if any happened to (I never use mod repost sites but was curious how much 'traction' Rift has gotten since it's been available like with Liteloader, or if they only hosted Forge mods only)), similar to Fabric hosting from what I know of only on Curseforge which works for me .)
Just an idea is all, But due to Fabric getting one, I thought modloaders that have their own would benefit a category for users looking for mods that support them with quick access once 2 or 3 are likely to be available for 1.13 and knowing where to find them (besides dependencies existing I know). Not disappointed if it isn't to happen. I'm at least excited Fabric got a category and Datapacks have the Customization tab for 1.13/1.14 to call their own.
Niche Community Content Finder, Youtuber, Modpack/Map Maker, Duck
Forum Thread Maintainer for APortingCore, Liteloader Download HUB, Asphodel Meadows, Fabric Project, Legacy Fabric/Cursed Fabric, Power API, Rift/Fabric/Forge 1.13 to 1.17.
Wikis I Maintain: https://modwiki.miraheze.org/wiki/User:SuntannedDuck2
Hello there, I nee help, because I can't figure out what should I put instead of "archivesBaseName" and "version".
Rusoski a sus ordenes!
You have to edit the gradle.properties file instead. Then change the values below the mod properties comment.
mod_version is the version of your mod. (I recommend putting something like 1.0.0)
maven_group should be (I think) the name you put for your packages (like com.example)
archives_base_name is the name your mod's jar file will have (the version should be added automatically)
hello
Thanks dude!
Rusoski a sus ordenes!
HI,
I just tried to follow your tutotial and faced several issues.
I cloned 3 project from the repository: fabric, fabric loom and fabric example.
I blocked at "Setting up Fabric" the step : "Open a Command Prompt window and navigate to the folder using the command "cd <path to folder>". Once there, run the "gradlew genSources idea" command to set up a workspace made for IntelliJ IDEA".
After i finished cloning, i went into the "fabric-exemple" folder and runned your command.
I got :
zsh: command not found: gradlew
I didnt know about gradle so i installed it and runned again, same result.
When i run only "gradle genSources idea" i get a build fail:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/takima/Jeux/Minecraft/Dev/Fabric/fabric-example-mod/build.gradle' line: 2
* What went wrong:
Plugin [id: 'fabric-loom', version: '0.2.2-SNAPSHOT'] was not found in any of the following sources:
- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.4.1/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (snapshot plugin versions are not supported)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Here is what i filled in the build.gradle:
plugins {
id 'fabric-loom' version '0.2.2-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.firstmod
version = 1.0
group = project.maven_group
minecraft {
}
Just changed project.version by 1.0 and project.archive_name by project.firstmod.
I'm developper but very new to minecraft modding, gradle and fabric. I couldn't find any tutorial but your to use fabric so
i really count on it .
If you don't get any responses by the Moderator in general or due to the Minecraft Forums archiving I'd say go to the Fabric Discord and they can help you out.
https://discord.gg/v6v4pMv
Niche Community Content Finder, Youtuber, Modpack/Map Maker, Duck
Forum Thread Maintainer for APortingCore, Liteloader Download HUB, Asphodel Meadows, Fabric Project, Legacy Fabric/Cursed Fabric, Power API, Rift/Fabric/Forge 1.13 to 1.17.
Wikis I Maintain: https://modwiki.miraheze.org/wiki/User:SuntannedDuck2
that looks like when you installed gradle you may have forgotten to add the gradle dir to your environmental Path
Linux & MacOS users
Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:
$ export PATH=$PATH:/opt/gradle/gradle-5.4.1/bin
Microsoft Windows users
In File Explorer right-click on the This PC (or Computer) icon,
then click Properties -> Advanced System Settings -> Environmental Variables.
Under System Variables select Path, then click Edit.
Add an entry for the bin forlder in your gradle installation fordler eg. "C:\Gradle\gradle-5.4.1\bin."
Click OK to save.
Step 4. Verify your installation[/header]
Open a console (or a Windows command prompt) and run gradle -v to run gradle and display the version, e.g.:
$ gradle -v
------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------