From 7f04b7820cc2ccfed2260cb7ca7eecc9185fe21e Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:22:37 -0400 Subject: [PATCH 1/5] Update Networth Calculator --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index fb662b6712..a6bb442fe9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ occlusionculling_version = 0.0.8-SNAPSHOT ## neu repoparser (https://repo.nea.moe/#/releases/moe/nea/neurepoparser/) repoparser_version = 1.6.0 ## Networth Calculator (https://github.com/AzureAaron/networth-calculator) -networth_calculator_version = 1.0.4 +networth_calculator_version = 1.0.5 ## Legacy Item DFU (https://github.com/AzureAaron/legacy-item-dfu) legacy_item_dfu_version = 1.0.1+1.21.1 From df30c1d2fb38ef8e1300e5cb36cfc1c52fa6b825 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:33:14 -0400 Subject: [PATCH 2/5] Fix Skyblock XP Message cache using the wrong hash --- .../skyblock/chat/SkyblockXpMessages.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/SkyblockXpMessages.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/SkyblockXpMessages.java index 2162da773e..0e46115b7d 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/chat/SkyblockXpMessages.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/SkyblockXpMessages.java @@ -27,12 +27,16 @@ private static void onMessage(Text text, boolean overlay) { if (Utils.isOnSkyblock() && overlay && SkyblockerConfigManager.get().chat.skyblockXpMessages) { String message = text.getString(); Matcher matcher = SKYBLOCK_XP_PATTERN.matcher(message); - int hash = message.hashCode(); - if (matcher.find() && !RECENT_MESSAGES.contains(hash)) { - CLIENT.player.sendMessage(Constants.PREFIX.get().append(matcher.group())); - RECENT_MESSAGES.add(hash); - Scheduler.INSTANCE.schedule(() -> RECENT_MESSAGES.remove(hash), 20 * 10); + if (matcher.find()) { + String xpMessage = matcher.group(); + int hash = xpMessage.hashCode(); + + if (!RECENT_MESSAGES.contains(hash)) { + CLIENT.player.sendMessage(Constants.PREFIX.get().append(xpMessage)); + RECENT_MESSAGES.add(hash); + Scheduler.INSTANCE.schedule(() -> RECENT_MESSAGES.remove(hash), 20 * 10); + } } } } From 0a26a5c74daedc2f3ff2090f55e38aae863fbe5a Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:43:04 -0400 Subject: [PATCH 3/5] Fix LBin Average Tooltip not working --- .../skyblock/item/tooltip/adders/AvgBinTooltip.java | 10 +++++----- .../item/tooltip/info/DataTooltipInfoType.java | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/adders/AvgBinTooltip.java b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/adders/AvgBinTooltip.java index 7fe67c7c6e..827fee74bf 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/adders/AvgBinTooltip.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/adders/AvgBinTooltip.java @@ -1,6 +1,6 @@ package de.hysky.skyblocker.skyblock.item.tooltip.adders; -import de.hysky.skyblocker.config.configs.GeneralConfig; +import de.hysky.skyblocker.config.configs.GeneralConfig.Average; import de.hysky.skyblocker.skyblock.item.tooltip.ItemTooltip; import de.hysky.skyblocker.skyblock.item.tooltip.SimpleTooltipAdder; import de.hysky.skyblocker.skyblock.item.tooltip.info.TooltipInfoType; @@ -21,8 +21,9 @@ public AvgBinTooltip(int priority) { public void addToTooltip(@Nullable Slot focusedSlot, ItemStack stack, List lines) { String skyblockApiId = stack.getSkyblockApiId(); String neuName = stack.getNeuName(); + Average type = ItemTooltip.config.avg; - if (TooltipInfoType.ONE_DAY_AVERAGE.getData() == null || TooltipInfoType.THREE_DAY_AVERAGE.getData() == null) { + if ((TooltipInfoType.ONE_DAY_AVERAGE.getData() == null && type != Average.THREE_DAY) || (TooltipInfoType.THREE_DAY_AVERAGE.getData() == null && type != Average.ONE_DAY)) { ItemTooltip.nullWarning(); } else { /* @@ -30,10 +31,9 @@ public void addToTooltip(@Nullable Slot focusedSlot, ItemStack stack, List and enchanted books because there is no data for their in API. */ if (!neuName.isEmpty() && TooltipInfoType.LOWEST_BINS.hasOrNullWarning(skyblockApiId)) { - GeneralConfig.Average type = ItemTooltip.config.avg; // "No data" line because of API not keeping old data, it causes NullPointerException - if (type == GeneralConfig.Average.ONE_DAY || type == GeneralConfig.Average.BOTH) { + if (type == Average.ONE_DAY || type == Average.BOTH) { lines.add( Text.literal(String.format("%-19s", "1 Day Avg. Price:")) .formatted(Formatting.GOLD) @@ -43,7 +43,7 @@ public void addToTooltip(@Nullable Slot focusedSlot, ItemStack stack, List ) ); } - if (type == GeneralConfig.Average.THREE_DAY || type == GeneralConfig.Average.BOTH) { + if (type == Average.THREE_DAY || type == Average.BOTH) { lines.add( Text.literal(String.format("%-19s", "3 Day Avg. Price:")) .formatted(Formatting.GOLD) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/info/DataTooltipInfoType.java b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/info/DataTooltipInfoType.java index 2edacb2598..f396e4d366 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/info/DataTooltipInfoType.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/tooltip/info/DataTooltipInfoType.java @@ -1,6 +1,5 @@ package de.hysky.skyblocker.skyblock.item.tooltip.info; -import java.util.List; import java.util.concurrent.CompletableFuture; import org.jetbrains.annotations.Nullable; From 0eb126c592a995d7543b844dc552a9cc4ee0f36c Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:11:34 -0400 Subject: [PATCH 4/5] New Quiz question + tiny refactor --- .../skyblocker/skyblock/dungeon/puzzle/Trivia.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/puzzle/Trivia.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/puzzle/Trivia.java index 874907c30b..b1954d50fc 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/puzzle/Trivia.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/puzzle/Trivia.java @@ -2,6 +2,7 @@ import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.waypoint.FairySouls; +import de.hysky.skyblocker.utils.SkyblockTime; import de.hysky.skyblocker.utils.Utils; import de.hysky.skyblocker.utils.chat.ChatFilterResult; import de.hysky.skyblocker.utils.chat.ChatPatternListener; @@ -24,6 +25,8 @@ public class Trivia extends ChatPatternListener { private List solutions = Collections.emptyList(); public Trivia() { + //FIXME I think its worth replacing this with something less fragile and is capable of handing multiple lines + //perhaps manual incremental reading based off the start of a question super("^ +(?:([A-Za-z,' ]*\\?)| ([ⓐⓑⓒ]) ([a-zA-Z0-9 ]+))$"); } @@ -50,9 +53,7 @@ private void updateSolutions(String question) { try { String trimmedQuestion = question.trim(); if (trimmedQuestion.equals("What SkyBlock year is it?")) { - long currentTime = System.currentTimeMillis() / 1000L; - long diff = currentTime - 1560276000; - int year = (int) (diff / 446400 + 1); + int year = SkyblockTime.skyblockYear.get(); solutions = Collections.singletonList("Year " + year); } else { String[] questionAnswers = answers.get(trimmedQuestion); @@ -79,7 +80,9 @@ private void updateSolutions(String question) { answers.put("What is the status of Maxor, Storm, Goldor, and Necron?", new String[]{"The Wither Lords"}); answers.put("Which brother is on the Spider's Den?", new String[]{"Rick"}); answers.put("What is the name of Rick's brother?", new String[]{"Pat"}); - answers.put("What is the name of the Painter in the Hub?", new String[]{"Marco"}); + //Full Question: "What is the name of the vendor in the Hub who sells stained glass?" + //The solver cannot handle multiple lines right now and just sees "glass?" as the question + answers.put("glass?", new String[]{"Wool Weaver"}); answers.put("What is the name of the person that upgrades pets?", new String[]{"Kat"}); answers.put("What is the name of the lady of the Nether?", new String[]{"Elle"}); answers.put("Which villager in the Village gives you a Rogue Sword?", new String[]{"Jamie"}); From ab7dcd8d4493ef46dde851f9ebde87923e57035b Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:15:26 -0400 Subject: [PATCH 5/5] Fix Recoloured Textures pack showing as outdated --- .../resourcepacks/recolored_dungeon_items/pack.mcmeta | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/resources/resourcepacks/recolored_dungeon_items/pack.mcmeta b/src/main/resources/resourcepacks/recolored_dungeon_items/pack.mcmeta index 9533c3d9a3..80dace5295 100644 --- a/src/main/resources/resourcepacks/recolored_dungeon_items/pack.mcmeta +++ b/src/main/resources/resourcepacks/recolored_dungeon_items/pack.mcmeta @@ -1,6 +1,10 @@ { "pack": { - "pack_format": 22, + "pack_format": 34, + "supported_formats": { + "min_inclusive": 34, + "max_inclusive": 2147483647 + }, "description": "Recolored textures found in dungeons" } } \ No newline at end of file