diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-09-23 23:33:16 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-23 15:33:16 +0200 |
| commit | 61c53c0054431e75826d071dfb363406b5763195 (patch) | |
| tree | f55192c8e45e7871614a19d611159badac596552 /src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | |
| parent | 21a353f09edc1623d339dd9f7eea639b35891d57 (diff) | |
| download | notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.gz notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.bz2 notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.zip | |
Pet overlay fixes (#290)
* fixed pet overlay going to level 100
* fixed transparent pet and equip overlay not using the special texture
fixed pet overlay showing a pet when you remove your pet
* made pet overlay show the current stats of your pet
* Fixed pet overlay showing Until level 100.0
* Fixed pet stats not showing decimal
* Made pet overlay show xp to next level
* 2.1.md slight smile
* Try to generify pet lore replacements a tiny bit
Also move pets page to use the same code as the pet overlay
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: nea <romangraef@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 92e2cfd6..62b24111 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -1380,7 +1380,7 @@ public class NEUManager { float statMax = entry.getValue().getAsFloat(); float statMin = min.get("statNums").getAsJsonObject().get(entry.getKey()).getAsFloat(); float val = statMin * minMix + statMax * maxMix; - String statStr = (statMin > 0 ? "+" : "") + (int) Math.floor(val); + String statStr = (statMin > 0 ? "+" : "") + removeUnusedDecimal(Math.floor(val * 10) / 10); replacements.put(entry.getKey(), statStr); } } @@ -1457,6 +1457,7 @@ public class NEUManager { } public ItemStack jsonToStack(JsonObject json, boolean useCache, boolean useReplacements, boolean copyStack) { + if (useReplacements) useCache = false; if (json == null) return new ItemStack(Items.painting, 1, 10); String internalname = json.get("internalname").getAsString(); |
