diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-25 09:39:40 +1100 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-25 09:39:40 +1100 |
| commit | 3f86e881074dc4220aab23cae69f002c62f0b25a (patch) | |
| tree | 47bab2c49730b0fadebde420209472d5d63757ad /src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java | |
| parent | 7ebee833e54e95ffcd9dcfbad5744e299102acd9 (diff) | |
| download | notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.tar.gz notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.tar.bz2 notenoughupdates-3f86e881074dc4220aab23cae69f002c62f0b25a.zip | |
1.4.5
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java index 1011f3cc..d8d84144 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/AccessoryBagOverlay.java @@ -4,6 +4,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.profileviewer.PlayerStats; +import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; @@ -226,7 +227,7 @@ public class AccessoryBagOverlay { private static Set<ItemStack> duplicates = null; public static void renderDuplicatesOverlay(int x, int y) { if(duplicates == null) { - JsonObject misc = Utils.getConstant("misc"); + JsonObject misc = Constants.MISC; if(misc == null) { Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70, new Color(80, 80, 80).getRGB()); @@ -297,7 +298,7 @@ public class AccessoryBagOverlay { private static List<ItemStack> missing = null; public static void renderMissingOverlay(int x, int y) { if(missing == null) { - JsonObject misc = Utils.getConstant("misc"); + JsonObject misc = Constants.MISC; if(misc == null) { Utils.drawStringCenteredScaledMaxWidth("Duplicates: ERROR", Minecraft.getMinecraft().fontRendererObj, x+40, y+12, false, 70, new Color(80, 80, 80).getRGB()); @@ -788,7 +789,7 @@ public class AccessoryBagOverlay { } public static boolean isAccessory(ItemStack stack) { - return checkItemType(stack, false, "ACCESSORY", "HATCCESSORY") >= 0; + return checkItemType(stack, true, "ACCESSORY", "HATCCESSORY") >= 0; } public static int getRarity(ItemStack stack) { @@ -800,7 +801,7 @@ public class AccessoryBagOverlay { for (int i = list.tagCount(); i >= 0; i--) { String line = list.getStringTagAt(i); for(int j=0; j<rarityArrC.length; j++) { - if(line.startsWith(rarityArrC[j])) { + if(line.contains(rarityArrC[j])) { return j; } } |
