A maven artifact for developing fabric mods with maven
Find a file
2025-08-31 15:51:20 +01:00
.idea Initializee 2025-08-30 13:02:46 +01:00
artisan-core Add support for non-bundled mojang dependencies. 2025-08-31 15:19:27 +01:00
artisan-extension Add support for non-bundled mojang dependencies. 2025-08-31 15:19:27 +01:00
artisan-maven-plugin Add support for non-bundled mojang dependencies. 2025-08-31 15:19:27 +01:00
.gitignore Add README.md 2025-08-31 15:51:20 +01:00
artisan.iml Initializee 2025-08-30 13:02:46 +01:00
pom.xml Initializee 2025-08-30 13:02:46 +01:00
README.md Add README.md 2025-08-31 15:51:20 +01:00

Artisan

Artisan is a maven plugin for using the net.minecraft namespace within maven projects.

Advantages:

  • Uses yarn under the hood, which is by far the most documented net.minecraft implementation
  • Loader agnostic: Only depends on a small number of fabric helpers that do not restrict usage to only fabric mods
  • Lets you develop minecraft mods without gradle (god I hate gradle so much)

Disadvantages:

  • Non-standard setup compared to other maven dependencies
    • This setup only needs to be performed once, and is stable between projects

Usage

1. Clone this repo

git clone https://forgejo.debswirl.net/DebSwirl/artisan.git

2. Build and install this project locally

cd artisan && mvn install

Alternatively, open the project in Intellij IDEA, and:

  • open up the maven panel
  • Expand artisan-parent > Lifecycle
  • Run the install step

This makes artisan available locally for use

3. Configure a project for artisan

Open up your mod's pom.xml file, and do the following:

3.1 Accept the minecraft EULA

<properties>
    <acceptMinecraftEula>true</acceptMinecraftEula>
</properties>

3.2 Add the glaremaster's maven repository

<repositories>
    <repository>
        <id>glaremasters-public</id>
        <url>https://repo.glaremasters.me/repository/public/</url>
    </repository>
</repositories>

3.3 Set up the artisan plugin

<build>
    <plugins>
        <plugin>
            <groupId>net.debswirl.artisan</groupId>
            <artifactId>artisan-maven-plugin</artifactId>
            <version>0.1.0-SNAPSHOT</version>
            <executions>
                <execution>
                    <id>remap-out</id>
                    <phase>verify</phase>
                    <goals><goal>remapJar</goal></goals>
                    <configuration>
                        <minecraftVersion>1.21.4</minecraftVersion>
                        <yarnVersion>1.21.4+build.1</yarnVersion>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Change minecraftVersion and yarnVersion to your target version.

3.4 Add the artisan extension

Create a directory named .mvn/ in the root of your project

In this directory, create a file named extensions.xml, with the following file content:

<extensions>
    <extension>
        <groupId>net.debswirl.artisan</groupId>
        <artifactId>artisan-extension</artifactId>
        <version>0.1.0-SNAPSHOT</version>
    </extension>
</extensions>

4. Run the verify step for your project

All mods that use artisan must rely on the verify step instead of the package step.

4.a Via the command line

mvn verify

4.b Via Intellij IDEA

  • open up the maven panel
  • Expand your project > Lifecycle
  • Run the verify step

You should now be able to use yarn bindings