diff options
| author | DoKM <mcazzyman@gmail.com> | 2021-08-23 15:15:15 +0200 |
|---|---|---|
| committer | DoKM <mcazzyman@gmail.com> | 2021-08-23 15:15:15 +0200 |
| commit | 752e77d7407bfa7a0355677cd15d205fccf8d8f1 (patch) | |
| tree | 35ba288d48983e8742de28d0e0f44d351ee7cde4 /src/main/java/io/github/moulberry/notenoughupdates/util | |
| parent | f85740988b8fe5ae8255a97eca2333e63937f96c (diff) | |
| download | notenoughupdates-752e77d7407bfa7a0355677cd15d205fccf8d8f1.tar.gz notenoughupdates-752e77d7407bfa7a0355677cd15d205fccf8d8f1.tar.bz2 notenoughupdates-752e77d7407bfa7a0355677cd15d205fccf8d8f1.zip | |
Fix some pet xp tooltip bugs
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 8f373460..3e84261c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -469,7 +469,7 @@ public class Utils { return str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase(); } - private static String[] rarityArr = new String[] { + public static String[] rarityArr = new String[] { "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", }; @@ -547,6 +547,11 @@ public class Utils { return -1; } + public static float round (float value, int precision) { + int scale = (int) Math.pow(10, precision); + return (float) Math.round(value * scale) / scale; + } + public static void playPressSound() { |
