promotional bannermobile promotional banner
premium banner
Level up Items as they're used for stat increases.

Description

Overview


With this mod, most tools, weapons, and armor are levelled up as they're used.  As an item goes up in level, it gains 1 or more bonuses to stats.


In order for an item to gain experience, it must be used for it's associated task correctly.

Tools gain experience by harvesting blocks (not to be confused with destroying them), 1 point per block.
 
Weapons gain experience by attacking and damaging mobs, 1 point per hit.

Armor gains experience by taking and blocking damage, 1 point per pre-reduction damage taken.  Note: damage from sources that bypass armor suck as magic, /kill, starvation, or anything else in the damage tag will NOT give experience!


This mod is focused on configurability so almost any item can be made to have custom level up effects.  Currently only vanilla items are supported out of the box. 

While this mod is required on server and client, all of the configuration is handled through datapacks.

This mod looks for the data/domain/levelup folder to load providers from, and has a few basic defaults as examples.

 

Example json and explanation:

{
  "items": [
    "minecraft:iron_sword",
    "minecraft:diamond_sword",
    "minecraft:netherite_sword",
    "minecraft:wooden_sword",
    "minecraft:stone_sword",
    "minecraft:golden_sword"
  ],
  "provider": {
    "max_level": 15,
    "rewards": [
      {
        "attribute": "minecraft:generic.attack_damage",
        "increase_per_level": 0.25,
        "operation": "ADDITION",
        "slots": [
          "MAINHAND"
        ]
      }
    ],
    "scale": {
      "type": "linear",
      "config": {
        "a": 10
      }
    },
    "valid_actions": [
      "attack"
    ]
  }
}

 

If the json is completely blank; only contains {} then it will be skipped with a note in the log.

Keys:
items : The list of items that this provider should apply to, note that if the same item appears in multiple jsons it will be overwritten

provider: The leveling handler

  max_level: The maximum number of levels this item can reach.

  rewards: what rewards are given when the item levels up, can be multiple
  attribute: The attribute to increase