diff options
-rw-r--r-- | CHANGELOG.md | 12 | ||||
-rw-r--r-- | FEATURES.md | 3 | ||||
-rw-r--r-- | README.md | 13 | ||||
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java | 17 | ||||
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java | 32 |
6 files changed, 57 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a9518344..dbf2f0b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# Release 1.7.0 + +New Feature +* Commission HUD by @TacoMonkey11 in https://github.com/SkyblockerMod/Skyblocker/pull/55 +* Rewrote status bars again by @ExternalTime in https://github.com/SkyblockerMod/Skyblocker/pull/68 + +Fixes +* fixed crash on itemtooltip on legacy timestamps by @LifeIsAParadox +* Updated Trivia @LifeIsAParadox + +**Full Changelog**: https://github.com/SkyblockerMod/Skyblocker/compare/v1.6.3...v1.7.0 +___ # Release 1.6.3 Fixes diff --git a/FEATURES.md b/FEATURES.md index 4a057057..fd090daf 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -15,4 +15,5 @@ * Quicknav: fast navigate between pets, armor, enderchest, skill, collection, crafting, enchant, envil, warp dungeon, warp hub * Recipe book: in the vanilla recipe book all skyblock items are listed and you can see the recipe of the item * Backpack preview: after you clicked your backpack or enderchest once you can hover over the backpack or enderchest and hold shift to preview -* Update notification
\ No newline at end of file +* Update notification +* Commission HUD: Dwarven Mines quests
\ No newline at end of file @@ -2,15 +2,15 @@ ## Skyblocker [](https://modrinth.com/mod/skyblocker-liap) -[](https://github.com/LifeIsAParadox/Skyblocker/releases/latest) -[](https://github.com/LifeIsAParadox/Skyblocker/actions/workflows/beta.yml) +[](https://github.com/SkyblockerMod/Skyblocker/releases/latest) +[](https://github.com/SkyblockerMod/Skyblocker/actions/workflows/beta.yml) [](https://discord.com/invite/aNNJHQykck) [](https://ko-fi.com/wohlhabend) Hypixel Skyblock Mod for Minecraft 1.17.x + 1.18.x -Installation guide is [here](https://github.com/LifeIsAParadox/Skyblocker/wiki/installation) +Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/installation) ## Features <details open> @@ -20,9 +20,9 @@ Installation guide is [here](https://github.com/LifeIsAParadox/Skyblocker/wiki/i * Hide Messages: Ability Cooldown, Heal, AOTE, Implosion, Molten Wave, Teleport Pad Messages * Dungeon Minimap * Dungeon Puzzle Solver: - * Three Weirdos - * Blaze - * F7 Terminal: Order, Color, Name + * Three Weirdos + * Blaze + * F7 Terminal: Order, Color, Name * Dwarven Mines Solver: Fetchur, Puzzler * Drill Fuel in Item Durability Bar * Hotbar Slot Lock Keybind (Select the hotbar slot you want to lock/unlock and press the lockbutton) @@ -34,6 +34,7 @@ Installation guide is [here](https://github.com/LifeIsAParadox/Skyblocker/wiki/i * Recipe book: in the vanilla recipe book all skyblock items are listed and you can see the recipe of the item * Backpack preview: after you clicked your backpack or enderchest once you can hover over the backpack or enderchest and hold shift to preview * Update notification +* Commission HUD: Dwarven Mines quests </details> diff --git a/gradle.properties b/gradle.properties index d6eb2d06..79d03a91 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ clothconfig_version=6.2.57 mod_menu_version=3.1.0 # Mod Properties -mod_version = 1.6.3 +mod_version = 1.7.0 maven_group = me.xmrvizzy archives_base_name = skyblocker modrinth_id=y6DuFGwJ diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java index 673797d4..7f22f59b 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/Trivia.java @@ -60,16 +60,15 @@ public class Trivia extends ChatPatternListener { answers.put("What is the status of Thorn?", new String[]{"Shaman Necromancer"}); answers.put("What is the status of Livid?", new String[]{"Master Necromancer"}); answers.put("What is the status of Sadan?", new String[]{"Necromancer Lord"}); - answers.put("What is the status of Maxor?", new String[]{"Young Wither"}); - answers.put("What is the status of Goldor?", new String[]{"Wither Soldier"}); - answers.put("What is the status of Storm?", new String[]{"Elementalist"}); - answers.put("What is the status of Necron?", new String[]{"Wither Lord"}); - answers.put("How many total Fairy Souls are there?", new String[]{"227 Fairy Souls"}); + answers.put("What is the status of Maxor?", new String[]{"The Wither Lords"}); + answers.put("What is the status of Goldor?", new String[]{"The Wither Lords"}); + answers.put("What is the status of Storm?", new String[]{"The Wither Lords"}); + answers.put("What is the status of Necron?", new String[]{"The Wither Lords"}); + answers.put("How many total Fairy Souls are there?", new String[]{"238 Fairy Souls"}); answers.put("How many Fairy Souls are there in Spider's Den?", new String[]{"19 Fairy Souls"}); answers.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"}); - answers.put("How many Fairy Souls are there in The Barn?", new String[]{"7 Fairy Souls"}); - answers.put("How many Fairy Souls are there in Mushroom Desert?", new String[]{"13 Fairy Souls"}); - answers.put("How many Fairy Souls are there in Blazing Fortress?", new String[]{"19 Fairy Souls"}); + answers.put("How many Fairy Souls are there in The Farming Islands?", new String[]{"20 Fairy Souls"}); + answers.put("How many Fairy Souls are there in Crimson Isle?", new String[]{"29 Fairy Souls"}); answers.put("How many Fairy Souls are there in The Park?", new String[]{"11 Fairy Souls"}); answers.put("How many Fairy Souls are there in Jerry's Workshop?", new String[]{"5 Fairy Souls"}); answers.put("How many Fairy Souls are there in Hub?", new String[]{"79 Fairy Souls"}); @@ -83,7 +82,7 @@ public class Trivia extends ChatPatternListener { 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"}); - answers.put("How many unique minions are there?", new String[]{"55 Minions"}); + answers.put("How many unique minions are there?", new String[]{"58 Minions"}); answers.put("Which of these enemies does not spawn in the Spider's Den?", new String[]{"Zombie Spider", "Cave Spider", "Wither Skeleton", "Dashing Spooder", "Broodfather", "Night Spider"}); answers.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java index 3a5980f0..fdff7831 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java @@ -13,7 +13,6 @@ import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,8 +20,10 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; -import java.time.Month; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Locale; import java.util.concurrent.CompletableFuture; @@ -180,6 +181,20 @@ public class PriceInfoTooltip { return stack.getNbt(); } + /** + * this method converts the "timestamp" variable into the same date format as Hypixel represents it in the museum. + * Currently there are two types of timestamps the legacy which is built like this + * "dd/MM/yy hh:mm" ("25/04/20 16:38") and the current which is built like this + * "MM/dd/yy hh:mm aa" ("12/24/20 11:08 PM"). Since Hypixel transforms the two formats into one format without + * taking into account of their formats, we do the same. The final result looks like this + * "MMMM dd, yyyy" (December 24, 2020). + * Since the legacy format has a 25 as "month" SimpleDateFormat converts the 25 into 2 years and 1 month and makes + * "25/04/20 16:38" -> "January 04, 2022" instead of "April 25, 2020". + * This causes the museum rank to be much worse than it should be. + * + * @param stack the item under the pointer + * @return if the item have an "Timestamp" it will be shown formated on the tooltip + */ public static String getTimestamp(ItemStack stack) { NbtCompound tag = getInternalNameForItem(stack); String internalName = null; @@ -187,9 +202,16 @@ public class PriceInfoTooltip { NbtCompound ea = tag.getCompound("ExtraAttributes"); if (ea.contains("timestamp", 8)) { - internalName = ea.getString("timestamp").replaceAll("\\s(.*)", ""); - int month = Integer.parseInt(internalName.replaceAll("(\\d+)/(\\d+)/(\\d+)", "$1")); - internalName = StringUtils.capitalize(internalName.replaceAll("(\\d+)/(\\d+)/(\\d+)", Month.of(month) + " $2, 20$3").toLowerCase()); + internalName = ea.getString("timestamp"); + SimpleDateFormat dt = new SimpleDateFormat("MM/dd/yy"); + + try { + Date date = dt.parse(internalName); + SimpleDateFormat dt1 = new SimpleDateFormat("MMMM dd, yyyy", Locale.ENGLISH); + internalName = dt1.format(date); + } catch (ParseException e) { + LOGGER.warn("[Skyblocker-tooltip] getTimestamp", e); + } } } return internalName; |