aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java38
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java2
2 files changed, 29 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
index 992b2609..291bf4cf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
@@ -166,12 +166,28 @@ public class MiscTaskLevel extends GuiTaskLevel {
}
int sbXpTimeCharm = 0;
- if (object.has("rift") &&
- object.getAsJsonObject("rift").has("gallery") &&
- object.getAsJsonObject("rift").getAsJsonObject("gallery").has("secured_trophies")) {
- JsonArray timeCharms = object.getAsJsonObject("rift").getAsJsonObject("gallery").getAsJsonArray(
- "secured_trophies");
- sbXpTimeCharm += timeCharms.size() * miscellaneousTask.get("timecharm_xp").getAsInt();
+ int sbXpBurger = 0;
+ if (object.has("rift")) {
+ JsonObject rift = object.getAsJsonObject("rift");
+ if (rift.has("gallery") &&
+ rift.getAsJsonObject("gallery").has("secured_trophies")) {
+ JsonArray timeCharms = rift.getAsJsonObject("gallery").getAsJsonArray(
+ "secured_trophies");
+ sbXpTimeCharm += timeCharms.size() * miscellaneousTask.get("timecharm_xp").getAsInt();
+ }
+
+
+ if (rift.has("castle") && rift.getAsJsonObject("castle").has("grubber_stacks") && miscellaneousTask.has("mcgrubber_burger_xp")) {
+ sbXpBurger = miscellaneousTask.get("mcgrubber_burger_xp").getAsInt()
+ * rift.getAsJsonObject("castle").get("grubber_stacks").getAsInt();
+ }
+ }
+
+ int sbXpSerum = 0;
+ if (object.has("experimentation") &&
+ object.getAsJsonObject("experimentation").has("serums_drank")
+ && miscellaneousTask.has("metaphysical_serum_xp")) {
+ sbXpSerum = miscellaneousTask.get("metaphysical_serum_xp").getAsInt() * object.getAsJsonObject("experimentation").get("serums_drank").getAsInt();
}
List<String> lore = new ArrayList<>();
@@ -179,8 +195,9 @@ public class MiscTaskLevel extends GuiTaskLevel {
lore.add(levelPage.buildLore("Accessory Bag Upgrades",
sbXpAccessoryUpgrade, 0, true
));
- lore.add(levelPage.buildLore("Reaper Peppers",
- sbXpReaperPeppers, miscellaneousTask.get("reaper_peppers").getAsInt(), false
+ int xpConsumableItems = sbXpReaperPeppers + sbXpBurger + sbXpSerum;
+ lore.add(levelPage.buildLore("Consumable Items",
+ xpConsumableItems, miscellaneousTask.get("consumable_items").getAsInt(), false
));
lore.add(levelPage.buildLore("Timecharms",
sbXpTimeCharm, miscellaneousTask.get("timecharm").getAsInt(), false
@@ -208,8 +225,9 @@ public class MiscTaskLevel extends GuiTaskLevel {
sbXpRelays, miscellaneousTask.get("unlocking_relays").getAsInt(), false
));
- int totalXp = sbXpReaperPeppers + sbXpDojo + sbXpGainedHarp + sbXpAbiphone +
- sbXpCommunityUpgrade + sbXpPersonalBank + sbXpTimeCharm + sbXpRelays;
+
+ int totalXp =sbXpDojo + sbXpGainedHarp + sbXpAbiphone +
+ sbXpCommunityUpgrade + sbXpPersonalBank + sbXpTimeCharm + sbXpRelays + xpConsumableItems;
levelPage.renderLevelBar(
"Misc. Task",
new ItemStack(Items.map),
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
index bff6834c..9dc1ea8d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
@@ -121,7 +121,7 @@ public class RiftPage extends GuiProfileViewerPage {
Utils.drawTexturedRect(guiLeft + 35, guiTop + 156, 20, 20, 0, 20 / 256f, 0, 20 / 256f, GL11.GL_NEAREST);
JsonObject deadCats = riftData.getAsJsonObject("dead_cats");
- if (!deadCats.entrySet().isEmpty() && deadCats.has("found_cata")) {
+ if (!deadCats.entrySet().isEmpty() && deadCats.has("found_cats")) {
JsonArray foundCats = deadCats.getAsJsonArray("found_cats");
int size = foundCats.size();