A maven artifact for developing fabric mods with maven
| .idea | ||
| artisan-core | ||
| artisan-extension | ||
| artisan-maven-plugin | ||
| .gitignore | ||
| artisan.iml | ||
| pom.xml | ||
| README.md | ||
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
installstep
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
verifystep
You should now be able to use yarn bindings