Skip to main content

Setup

This page covers the technical setup for using PetarLib in your Fabric mod project.

Gradle

Add the PetarMc Maven repository and the dependency in your build.gradle:

build.gradle
repositories {
maven {
url "https://maven.petarmc.com/releases"
}
}

dependencies {
modImplementation "com.petarmc:PetarLib:x.x.x"
// Include other dependencies
}

Maven

Add the PetarMc Maven repository and the dependency in your pom.xml:

pom.xml
<reositories>
<repository>
<id>petarmc</id>
<url>https://maven.petarmc.com/releases</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.petarmc</groupId>
<artifactId>PetarLib</artifactId>
<version>x.x.x</version>
<scope>provided</scope>
</dependency>
<!-- Include other dependencies -->
</dependencies>

Fabric Mod JSON

Ensure your fabric.mod.json includes PetarLib as a dependency:

fabric.mod.json
{
"depends": {
"petarlib": "*"
}
}