Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #87 from LumberWizard/master
Browse files Browse the repository at this point in the history
XP Cost multiplier config option
  • Loading branch information
bonii-xx authored Oct 17, 2018
2 parents e307664 + 3fdeb7a commit b23e769
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/slimeknights/toolleveling/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public void load(File file) {
ConfigFile.init();

configFile = this.load(new ConfigFile(file), ConfigFile.class);

if (configFile.toolxp.levelMultiplier < 2) {
configFile.toolxp.levelMultiplier = 2f;
configFile.setNeedsSaving();
}
}

public static int getBaseXpForTool(Item item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ static class ToolXP {
@Setting(comment = "Base XP for each of the listed tools")
public Map<Item, Integer> baseXpForTool = new HashMap<>();

@Setting(comment = "How much the XP cost will multiply per level, minimum 2.")
public float levelMultiplier = 2f;
}
}

0 comments on commit b23e769

Please sign in to comment.