aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java4
-rw-r--r--src/main/java/de/cowtipper/cowlection/util/Utils.java20
2 files changed, 15 insertions, 9 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
index f619752..df716dc 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/SkyBlockListener.java
@@ -74,7 +74,7 @@ public class SkyBlockListener {
// example: " §a42§7x §fLeather §7for §6436.8 coins"
private static final Pattern BAZAAR_SELL_ALL_PATTERN = Pattern.compile("^(?:§[0-9a-fl-or])* (?:§[0-9a-fl-or])+([0-9,]+)(?:§[0-9a-fl-or])+x (?:§[0-9a-fl-or])+.+ (?:§[0-9a-fl-or])+for (?:§[0-9a-fl-or])+([0-9,.]+) coins$");
private static final Pattern BAZAAR_TARGET_AMOUNT_PATTERN = Pattern.compile("^O(?:ff|rd)er amount: ([\\d,]+)x$");
- private static final Pattern BAZAAR_FILLED_PATTERN = Pattern.compile("^Filled: ([\\d,k]+)/(?:[\\d,k]+) \\(?([\\d.]+)%[)!]$");
+ private static final Pattern BAZAAR_FILLED_PATTERN = Pattern.compile("^Filled: ([\\d,.k]+)/(?:[\\d,.k]+) \\(?([\\d.]+)%[)!]$");
List<BestiaryEntry> bestiaryOverview = null;
private final NumberFormat numberFormatter;
private final Cowlection main;
@@ -184,7 +184,7 @@ public class SkyBlockListener {
IInventory inventory = chestContainer.getLowerChestInventory();
String inventoryName = (inventory.hasCustomName() ? EnumChatFormatting.getTextWithoutFormattingCodes(inventory.getDisplayName().getUnformattedTextForChat()) : inventory.getName());
- if (inventoryName.endsWith("➜ Graphs")) {
+ if (inventoryName.contains("➜ G")) {
// bazaar interface with graphs
drawGraph = true;
}
diff --git a/src/main/java/de/cowtipper/cowlection/util/Utils.java b/src/main/java/de/cowtipper/cowlection/util/Utils.java
index f7baba2..35b1231 100644
--- a/src/main/java/de/cowtipper/cowlection/util/Utils.java
+++ b/src/main/java/de/cowtipper/cowlection/util/Utils.java
@@ -320,9 +320,13 @@ public final class Utils {
reforge = reforge.substring(0, modifierSuffix);
}
int reforgeInItemName = originalItemName.indexOf(reforge);
- if (reforgeInItemName == -1 && reforge.equals("Light") && extraAttributes.getString("id").startsWith("HEAVY_")) {
+ String sbId = extraAttributes.getString("id");
+ if (reforgeInItemName == -1 && reforge.equals("Light") && sbId.startsWith("HEAVY_")) {
// special case: heavy armor with light reforge
reforgeInItemName = originalItemName.indexOf("Heavy");
+ } else if (reforgeInItemName > 10 && reforge.equals("Heavy") && sbId.startsWith("SUPER_HEAVY_")) {
+ // special case: super heavy armor with heavy reforge
+ reforgeInItemName = originalItemName.indexOf("Super Heavy");
}
if (reforgeInItemName > 0 && !originalItemName.contains(EnumChatFormatting.STRIKETHROUGH.toString())) {
@@ -331,16 +335,18 @@ public final class Utils {
int reforgeLength = reforge.length();
String reforgePrefix = null;
// special cases for reforge + item name
- if (reforge.equals("Heavy") && extraAttributes.getString("id").startsWith("HEAVY_")) {
+ if (reforge.equals("Heavy") && sbId.startsWith("HEAVY_")) {
reforgePrefix = "Extremely ";
- } else if (reforge.equals("Light") && extraAttributes.getString("id").startsWith("HEAVY_")) {
+ } else if (reforge.equals("Light") && sbId.startsWith("HEAVY_")) {
reforgePrefix = "Not So ";
- } else if ((reforge.equals("Wise") && extraAttributes.getString("id").startsWith("WISE_DRAGON_"))
- || (reforge.equals("Strong") && extraAttributes.getString("id").startsWith("STRONG_DRAGON_"))) {
+ } else if (reforge.equals("Heavy") && sbId.startsWith("SUPER_HEAVY_")) {
+ reforgePrefix = "Thicc ";
+ } else if ((reforge.equals("Wise") && sbId.startsWith("WISE_DRAGON_"))
+ || (reforge.equals("Strong") && sbId.startsWith("STRONG_DRAGON_"))) {
reforgePrefix = "Very ";
- } else if (reforge.equals("Superior") && extraAttributes.getString("id").startsWith("SUPERIOR_DRAGON_")) {
+ } else if (reforge.equals("Superior") && sbId.startsWith("SUPERIOR_DRAGON_")) {
reforgePrefix = "Highly ";
- } else if (reforge.equals("Perfect") && extraAttributes.getString("id").startsWith("PERFECT_")) {
+ } else if (reforge.equals("Perfect") && sbId.startsWith("PERFECT_")) {
reforgePrefix = "Absolutely ";
}
if (reforgePrefix != null) {