-
Notifications
You must be signed in to change notification settings - Fork 38
Home 1.17.1
This wiki aims to cover two topics: the in-game usage of PlayerEx; and the integration of the PlayerEx API into your own mod. Therefore, the points discussed here can generally be split into developer-centric or player-centric levels of understanding; with the former requiring the latter as a basis.
The jump from 1.16.5 to 1.17.1 resulted in the majority of functionality and configurability being outsourced to a standalone mod - Data Attributes. For documentation about configurability and customisability regarding attributes, please read the wiki for Data Attributes.
To add PlayerEx as a dependency to your mod, add the following to your build.gradle
.
repositories {
maven {
url = "https://www.cursemaven.com"
}
}
PlayerEx uses some jar-in-jar dependencies, which means you need to include the maven repository for those too. PlayerEx's dependencies are the following:
- Fabric API (this should be present in your default build script)
- Cardinal Components (Base, Entity & Level); this is a jar-in-jar dependency
- Data Attributes
- Cloth Config; this is a jar-in-jar dependency
- Text Placeholder API; this is a jar-in-jar dependency
- exp4j (a non-minecraft library available on maven central); this is a jar-in-jar dependency
The following maven repositories must also be present in your build.gradle
:
repositories {
mavenCentral()
maven {
name = "Ladysnake Mods"
url = 'https://ladysnake.jfrog.io/artifactory/mods'
}
maven {
url "https://maven.shedaniel.me/"
}
maven {
url "https://maven.nucleoid.xyz/"
}
maven {
url "https://maven.terraformersmc.com/"
}
}
At the time of writing, Jitpack does not support Java 16 yet and cannot be used to get builds. Instead, cursemaven can be used.
dependencies {
modImplementation "curse.maven:playerex-409221:<file number>"
}
The last number after the colon refers to the file id; you should always try to use the latest file.
It should be noted that if you are using cursemaven to get playerex as a dependency, you will need to manually add all of playerex's dependencies as well, as they will not automatically be added like when using a proper maven repository. I only use cursemaven as a primary repository because I'm cheap and lazy. Until another method comes along that doesn't require me to spend money, this is it unfortunately.