Skip to content
CleverNucleus edited this page Dec 13, 2021 · 14 revisions

Welcome

This wiki documents the following:

  • Using Data Attributes as a dependency for your mod (Gradle).
  • Changing attribute's default, minimum and maximum values, as well as their translation key.
  • Adding new attributes.
  • Modifying the contents of a living entity's attribute container.
  • Attribute Functions.
  • Attribute Properties.
  • Relevant Json formatting.
  • API structure and usage.

To navigate the wiki, please use the sidebar.

Integrating Data Attributes

To add Data Attributes as a dependency to your mod, add the following to your build.gradle.

repositories {
    maven {
        url = "https://www.cursemaven.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:dataattributes-514734:3428743"
}

The last number after the colon refers to the file id; you should always try to use the latest file. Instead of using cursemaven, it is recommended to download the DataAttributes github repository and publish it to your local maven, and using the implementation that way as cursemaven can be slow and because it's better to use a full maven artifact rather than just adding a completely built dependency.

Please note that Data Attributes requires Fabric API, so your build.gradle will have to accommodate that.