Attribute Modification
Both Attribute Setter and KubeJS can add attributes to items, armor, and curios. This will cover how to do both.
Attribute Setter
Attribute Setter relies on datapacks to apply attributes. Their schema and example files can be found here. data/my_namespace/attributesetter/entity/modify_entity.json
{
"minecraft:creeper": [
{
"attribute": "minecraft:generic.max_health",
"uuid": "0e1c07ef-d456-4567-b748-96b6f84b409e", //optional
"value": 5,
"operation": "BASE" // optional, default operation is BASE
},
{
"attribute": "minecraft:generic.follow_range",
"value": 10,
"operation": "ADDITION"
}
],
"#minecraft:raiders": [
{
"attribute": "minecraft:generic.max_health",
"value": 8,
"operation": "ADDITION"
}
],
"anymob": [ //This expands to "example:anymob" because of the filename
{
"attribute": "projectile_damage:generic",
"value": 10,
//default operation is BASE
}
]
} tip
UUIDs for the uuid field can be obtained through UUID generator sites such as https://www.uuidgenerator.net
KubeJS
WIP
info
Other mods that have this functionality are Attributizer and Custom Item Attributes, but they were not included in this guide for brevity and redundancy.
Tags: todocustom contentitems