From 93fd9ece889b68349bb3b2bdfc6943e5c356424d Mon Sep 17 00:00:00 2001 From: NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> Date: Mon, 19 Jun 2023 15:20:02 -0400 Subject: Fix coins displaying null in RPC (#246) --- .../at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index 20f203bb7..d114913bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -108,7 +108,7 @@ enum class DiscordStatus(private val displayMessageSupplier: Supplier?) } if (coins == "1") { lastKnownDisplayStrings[PURSE] = "1 Coin" - } else if (coins != "") { + } else if (coins != "" && coins != null) { lastKnownDisplayStrings[PURSE] = "$coins Coins" } lastKnownDisplayStrings[PURSE] ?: "" -- cgit From 9594c23b95f795b25adc8be415ed38f1f46634fb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 21:20:18 +0200 Subject: addSeparators --- .../hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt index c04d662e2..9faa3511b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt @@ -196,7 +196,7 @@ object SlayerItemProfitTracker { val renderable = if (inventoryOpen) Renderable.clickAndHover( text, listOf( - "§7Dropped §e$timesDropped §7times.", + "§7Dropped §e${timesDropped.addSeparators()} §7times.", "§7Your drop rate: §c$perBoss", "", "§eClick to " + (if (hidden) "show" else "hide") + "!", @@ -250,8 +250,8 @@ object SlayerItemProfitTracker { val slayerCompletedCount = itemLog.slayerCompletedCount addAsSingletonList( Renderable.hoverTips( - "§7Bosses killed: §e$slayerCompletedCount", - listOf("§7You killed the $itemLogCategory boss", "§e$slayerCompletedCount §7times.") + "§7Bosses killed: §e${slayerCompletedCount.addSeparators()}", + listOf("§7You killed the $itemLogCategory boss", "§e${slayerCompletedCount.addSeparators()} §7times.") ) ) -- cgit From c7c0fc35f13d244ef442417876b39ded0b7ece6f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 22:20:40 +0200 Subject: Added all 0.18 things into CHANGELOG.md and FEATURES.md --- CHANGELOG.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------ FEATURES.md | 46 +++++++++++++++++++++++++++++++--- 2 files changed, 115 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2fd4438b..9b05f4571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,13 @@ ## Version 0.18.BETA ### New Features -+ Added Visitor Drop Counter to track all the drops from visitors. ++ Added **Visitor Drop Counter** (Contributed by CalMWolfs) + + Counts up all the drops that you get from visitors + + Count each rarity of visitor Accepted + + Count copper, farming exp and coins spent + + Setting to show number or drop first + + Setting to show as the icon instead of the name + + Setting to show only on the barn plot + Added **Contest Time Needed** - Show the time and missing FF for every crop inside Jacob's Farming Contest inventory. + Added **Garden Start Location** + Show the start waypoint for your farm with the currently holding tool. @@ -14,7 +20,10 @@ + Sortable by price or items stored (both desc/asc) + Option to show prices from Bazaar or NPC + Added Farming Fortune Breakdown for Armor and Equipment (Contributed by CalMWolfs) + + Run /ff to open the menu + Works with: Base Stats, Reforge Bonus, Ability Fortune and Green Thumb + + Breakdown for the true farming fortune from each crop + + Ability to select a single piece of armor or equipment + Added Server Restart Title + Added Jacob Contest Stats Summary + Showing Blocks per Second and total Blocks clicked after a farming contest in chat @@ -28,7 +37,7 @@ + Supports tab completing for warp points when typing /warp + Supports party members, friends (need to visit all friend list pages), player on the same server + Supports these commands: /p, /party, /pt (party transfer), /f, /friend /msg, /w, /tell, /boop, /visit, /invite, /ah, /pv (NEU's Profile Viewer), /shmarkplayer (SkyHanni's Mark Player feature) - + Supports VIP /visit suggestions (currently PortalHub and prtlhub, if you know similar islands, tell us please) + + Supports VIP /visit suggestions (e.g. PortalHub or Hubportal) + Added Item Profit Tracker (Slayer only) + Count items collected and how much you pay while doing slayer, calculates final profit + Shows the price of the item collected in chat (default disabled) @@ -36,15 +45,51 @@ + Show item name and price over items laying on ground (only in slayer areas) + Added Broken Hyperion Warning (Slayer only) + Warns when right-clicking with a Wither Impact weapon (e.g. Hyperion) no longer gains combat exp - (Kill a mob with melee-hits to fix this hypixel bug) + + Kill a mob with melee-hits to fix this hypixel bug + + Only while doing slayer + Added Piece of Wizard Portal show earned by player name (Contributed by HiZe) -+ City Project Daily Reminder - Remind every 24 hours to participate ++ City Project Daily Reminder + + Remind every 24 hours to participate + Added Quick Mod Menu Switching (default disabled) + Allows for easy navigation between one Mod Config and another + Default disabled + Detects your SkyBlock Mod automatically + Does detect Chat Triggers and OneConfig itself, but no single mods that require these libraries -+ Added **Arachne Chat Hider** - Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary ++ Added **Arachne Chat Hider** + + Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary ++ Added **Contest Time Needed** + + Show the time and missing FF for every crop inside Jacob's Farming Contest inventory ++ Added **Sack Item Display** (Contributed by HiZe) + + Added price display next to sack items + + Can be disabled + + Sortable by price or items stored (both desc/asc) + + Option to show prices from Bazaar or NPC ++ Added profile id chat hider ++ Added Garden Crop Start Location + + Show the start waypoint for your farm with the currently holding tool. + + Auto-detects the start of the farm when farming for the first time + + Option to manually set the waypoint with `/shcropstartlocation` ++ Added Pet Candies Used number + + Works even after Hypixel removed the `10 pet candies applied` line ++ Added Estimated Armor Value display + + Shows the price of all 4 armor pieces combined inside the wardrobe ++ Added Garden Plot Icon (Contributed by HiZe) + + Select an item from the inventory to replace the icon in the Configure Plots inventory + + Change the Edit mode in the bottom right corner in the Configure Plots inventory ++ Showing fished item names ++ Show numbers of Pocket Sack-In-A-Sack applied on a sack (Default disabled, contributed by HiZe) ++ Added a warning when finding a visitor with a rare reward + + Show message in chat, over the visitor and prevents refusing ++ Added composter empty timer for outside garden ++ Added title warning when picking up an expensive slayer item ++ Added **RNG Meter Display** + + Display number of bosses needed until the next RNG Meter item drops + + Warn when no item is set in the RNG Meter + + Hide the RNG Meter message from chat if the current item is selected ++ Added **Ghost Counter** (Contributed by HiZe) + + Shows number of ghosts killed in the Mist in Dwarven Mines + + Shows kill combo, coins per scavenger, all item drops, bestiarity, magic find and more + + Each display line is highly customizable ### Changes + Added Options for displays Crop Milestone and Best Crop Time. @@ -57,10 +102,31 @@ + Derpy double health support + More fair detection logic + Added extra setting to allow/block clicks for the 'hide not clickable' feature ++ Disabled hide far particles feature in M7 boss fight. This will fix M7 boss fight features from other mods ++ Added support for multiple players/profiles: + + SkyHanni saves all profile specific data now separately (e.g., garden data, crimson isle reputation progress, minion display text on the island) + + Config toggles and GUI elements stay synced between all profiles ++ Reworked Hide Armor + + More options + = Fixed Movement bugs with Depth Strider enchantment + = Fixed compatibility issues with other mods + Note: The hide armor config got reset, if you want to use it, you have to enable it again) ++ Added support for maxed out crop milestones ++ Showing total price for visitor items needed ++ Warning when BPS in Jacob contest ff needed display is below 1 ++ More Discord Rich Presence features (Contributed by NetheriteMiner) + + Option "Profile" not only shows the profile name but also the profile type and SkyBlock level + + Option "Dynamic" now also supports stacking enchantments ++ Highlight the item in bazaar search result inventory when clicking on an item list (Contributed by CalMWolfs) ### Fixes -= Fixed typos in Trevor Trapper texts (Contributed by CalMWolfs) -= Fixed Hypixel bug that the equipment lore talks about "kills" instead of "visitors" (Contributed by CalMWolfs) ++ Fixed typos in Trevor Trapper texts (Contributed by CalMWolfs) ++ Fixed Hypixel bug that the equipment lore talks about "kills" instead of "visitors" (Contributed by CalMWolfs) ++ Fixed reforge stone 'warped' not detected in item price display ++ Hotkey to open SkyHanni Position Editor no longer works inside signs + +### Removals +- Removed Garden Recent Teleport Pads display ## Version 0.17 (2023-05-11) diff --git a/FEATURES.md b/FEATURES.md index 2089efb3f..523d8bc1a 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -20,7 +20,8 @@ - Scan messages sent by players in all-chat for blacklisted words and greys out the message. - Chat peeking (holding key to display chat without opening the chat gui) - Compact Potion Effect Messages -- **Arachne Chat Hider** - Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary +- **Arachne Chat Hider** + - Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary ## Dungeon - Clicked Blocks (Showing the block behind walls AFTER clicked on a chest, wither essence or a lever) @@ -65,6 +66,11 @@ + **Unclaimed Rewards** - Highlight contests with unclaimed rewards in the jacob inventory. + **Duplicate Hider** - Hides duplicate farming contests in the inventory. + **Contest Time** - Adds the real time format to the farming contest description. ++ Added Pet Candies Used number + + Works even after Hypixel removed the `10 pet candies applied` line ++ Added Estimated Armor Value display + + Shows the price of all 4 armor pieces combined inside the wardrobe ++ Show numbers of Pocket Sack-In-A-Sack applied on a sack (Default disabled, contributed by HiZe) ## Item Abilities - Show the cooldown of items in the inventory. @@ -114,6 +120,7 @@ - **Odger waypoint** - Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand. + **Hide Repeated Catches** - Delete past catches of the same trophy fish from chat. - (Thanks appable0 + **Trophy Counter Design** - Change the way trophy fish messages gets displayed in the chat. - (Thanks appable0) ++ Showing fished item names ## Damage Indicator - Show the remaining health of selected bosses in the game in a bigger GUI. @@ -150,7 +157,13 @@ + Show item name and price over items laying on ground (only in slayer areas) + **Broken Hyperion Warning** + Warns when right-clicking with a Wither Impact weapon (e.g. Hyperion) no longer gains combat exp - (Kill a mob with melee-hits to fix this hypixel bug) + + Kill a mob with melee-hits to fix this hypixel bug + + Only works while doing slayer ++ Title warning when picking up an expensive slayer item ++ Added **RNG Meter Display** + + Display number of bosses needed until the next RNG Meter item drops + + Warn when no item is set in the RNG Meter + + Hide the RNG Meter message from chat if the current item is selected ### Diana + Show burrows near you. @@ -240,6 +253,22 @@ + Option to manually set the waypoint with /shcropstartlocation + Jacob Contest Stats Summary + Showing Blocks per Second and total Blocks clicked after a farming contest in chat ++ Added **Contest Time Needed** + + Show the time and missing FF for every crop inside Jacob's Farming Contest inventory ++ Added Garden Crop Start Location + + Show the start waypoint for your farm with the currently holding tool. + + Auto-detects the start of the farm when farming for the first time + + Option to manually set the waypoint with `/shcropstartlocation` ++ Added Farming Fortune Breakdown for Armor and Equipment (Contributed by CalMWolfs) + + Run /ff to open the menu + + Works with: Base Stats, Reforge Bonus, Ability Fortune and Green Thumb + + Breakdown for the true farming fortune from each crop + + Ability to select a single piece of armor or equipment ++ Added Garden Plot Icon (Contributed by HiZe) + + Select an item from the inventory to replace the icon in the Configure Plots inventory + + Change the Edit mode in the bottom right corner in the Configure Plots inventory ++ Show a warning when finding a **visitor with a rare reward** + + Show message in chat, over the visitor and prevents refusing ## Commands + **/wiki ** - using hypixel-skyblock.fandom.com instead of Hypixel wiki. @@ -284,10 +313,19 @@ + Supports tab completing for warp points when typing /warp + Supports party members, friends (need to visit all friend list pages), player on the same server + Supports these commands: /p, /party, /pt (party transfer), /f, /friend /msg, /w, /tell, /boop, /visit, /invite, /ah, /pv (NEU's Profile Viewer), /shmarkplayer (SkyHanni's Mark Player feature) - + Supports VIP /visit suggestions (currently PortalHub and prtlhub, if you know similar islands, tell us please) + + Supports VIP /visit suggestions (e.g. PortalHub or Hubportal) + Piece of Wizard Portal show earned by player name (Contributed by HiZe) + Quick Mod Menu Switching (default disabled) + Allows for easy navigation between one Mod Config and another + Default disabled + Detects your SkyBlock Mod automatically - + Does detect Chat Triggers and OneConfig itself, but no single mods that require these libraries \ No newline at end of file + + Does detect Chat Triggers and OneConfig itself, but no single mods that require these libraries ++ **Sack Item Display** (Contributed by HiZe) + + Added price display next to sack items + + Can be disabled + + Sortable by price or items stored (both desc/asc) + + Option to show prices from Bazaar or NPC ++ Added **Ghost Counter** (Contributed by HiZe) + + Shows number of ghosts killed in the Mist in Dwarven Mines + + Shows kill combo, coins per scavenger, all item drops, bestiarity, magic find and more + + Each display line is highly customizable \ No newline at end of file -- cgit From 5dc30f3988c874c35b5a6a7c220ea4bdaa452cbf Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 22:27:16 +0200 Subject: reformatted some changes --- CHANGELOG.md | 174 +++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 116 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b05f4571..fd07d3685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ + Setting to show number or drop first + Setting to show as the icon instead of the name + Setting to show only on the barn plot -+ Added **Contest Time Needed** - Show the time and missing FF for every crop inside Jacob's Farming Contest inventory. ++ Added **Contest Time Needed** + + Show the time and missing FF for every crop inside Jacob's Farming Contest inventory. + Added **Garden Start Location** + Show the start waypoint for your farm with the currently holding tool. + Auto-detects the start of the farm when farming for the first time @@ -131,87 +132,144 @@ ## Version 0.17 (2023-05-11) ### Features -+ Added **Time to Kill** - Show the time it takes to kill the Slayer boss. ++ Added **Time to Kill** + + Show the time it takes to kill the Slayer boss. + Added skill and collection level as item stack. -+ Added **Auction Highlighter** - Highlight own items that are sold in green and that are expired in red. ++ Added **Auction Highlighter** + + Highlight own items that are sold in green and that are expired in red. + Added support for tier 1 minions and title send for the minion craft helper. + Added Chicken head Timer. + Added **rancher boots** speed display. -+ Added **Unclaimed Rewards** - Highlight contests with unclaimed rewards in the jacob inventory. -+ Added **Duplicate Hider** - Hides duplicate farming contests in the inventory. -+ Added **Contest Time** - Adds the real time format to the farming contest description. -+ Added **Hide Repeated Catches** - Delete past catches of the same trophy fish from chat. - (contributed by appable) -+ Added **Trophy Counter Design** - Change the way trophy fish messages gets displayed in the chat. - (contributed by appable) -+ Added **CH Join** - Helps buy a Pass for accessing the Crystal Hollows if needed. -+ Added **Estimated Item Value** - Displays an estimated item value for the item you hover over. ++ Added **Unclaimed Rewards** + + Highlight contests with unclaimed rewards in the jacob inventory. ++ Added **Duplicate Hider** + + Hides duplicate farming contests in the inventory. ++ Added **Contest Time** + + Adds the real time format to the farming contest description. ++ Added **Hide Repeated Catches** (contributed by appable) + + Delete past catches of the same trophy fish from chat ++ Added **Trophy Counter Design** (contributed by appable) + + Change the way trophy fish messages gets displayed in the chat ++ Added **CH Join** + + Helps buy a Pass for accessing the Crystal Hollows if needed ++ Added **Estimated Item Value** + + Displays an estimated item value for the item you hover over + Added Arachne to damage indicator. -+ Added **Arachne Minis Hider** - Hides the nametag above arachne minis. -+ Added **Arachne Boss Highlighter** - Highlight the arachne boss in red and mini bosses and orange. -+ Added **Discord RPC** - Showing stats like Location, Purse, Bits, Purse or Held Item at Discord Rich Presence. - (contributed by NetheriteMiner) ++ Added **Arachne Minis Hider** + + Hides the nametag above arachne minis ++ Added **Arachne Boss Highlighter** + + Highlight the arachne boss in red and mini bosses and orange. ++ Added **Discord RPC** (contributed by NetheriteMiner) + + Showing stats like Location, Purse, Bits, Purse or Held Item at Discord Rich Presence ### Garden Features -+ Added **Copper Price** - Show copper to coin prices inside the Sky Mart inventory. -+ Added **Visitor Display** - Show all items needed for the visitors. -+ Added **Visitor Highlight** - Highlight visitor when the required items are in the inventory or the visitor is new and needs to checked what items it needs. -+ Added **Show Price** - Show the bazaar price of the items required for the visitors. -+ Added **Crop Milestone** Number - Show the number of the crop milestone in the inventory. -+ Added **Crop Upgrades** Number - Show the number of upgrades in the crop upgrades inventory. -+ Added **Visitor Timer** - Timer when the next visitor will appear, and a number how many visitors are already waiting. -+ Added **Visitor Notification** - Show as title and in chat when a new visitor is visiting your island. -+ Added **Plot Price** - Show the price of the plot in coins when inside the Configure Plots inventory. -+ Added **Garden Crop Milestone Display** - Shows the progress and ETA until the next crop milestone is reached and the current crops/minute value. (Requires a tool with either a counter or cultivating enchantment) -+ Added **Best Crop Display** - Lists all crops and their ETA till next milestone. Sorts for best crop for getting garden level or skyblock level. -+ Added **Copper Price** - Show the price for copper inside the visitor gui. -+ Added **Amount and Time** - Show the exact item amount and the remaining time when farmed manually. Especially useful for ironman. -+ Added **Custom Keybinds** - Use custom keybinds while having a farming tool or Daedalus Axe in the hand in the garden. ++ Added **Copper Price** + + Show copper to coin prices inside the Sky Mart inventory. ++ Added **Visitor Display** + + Show all items needed for the visitors. ++ Added **Visitor Highlight** + + Highlight visitor when the required items are in the inventory or the visitor is new and needs to checked what items it needs ++ Added **Show Price** + + Show the bazaar price of the items required for the visitors. ++ Added **Crop Milestone** Number + + Show the number of the crop milestone in the inventory. ++ Added **Crop Upgrades** Number + + Show the number of upgrades in the crop upgrades inventory. ++ Added **Visitor Timer** + + Timer when the next visitor will appear, and a number how many visitors are already waiting. ++ Added **Visitor Notification** + + Show as title and in chat when a new visitor is visiting your island. ++ Added **Plot Price** + + Show the price of the plot in coins when inside the Configure Plots inventory. ++ Added **Garden Crop Milestone Display** + + Shows the progress and ETA until the next crop milestone is reached and the current crops/minute value. (Requires a tool with either a counter or cultivating enchantment) ++ Added **Best Crop Display** + + Lists all crops and their ETA till next milestone. Sorts for best crop for getting garden level or skyblock level. ++ Added **Copper Price** + + Show the price for copper inside the visitor gui. ++ Added **Amount and Time** + + Show the exact item amount and the remaining time when farmed manually. Especially useful for ironman. ++ Added **Custom Keybinds** + + Use custom keybinds while having a farming tool or Daedalus Axe in the hand in the garden. + Added Desk shortcut in SkyBlock Menu. -+ Added **Garden Level Display** - Show the current garden level and progress to the next level. ++ Added **Garden Level Display** + + Show the current garden level and progress to the next level. + Added **Farming Weight and Leaderboard**, provided by the elite skyblock farmers. + Added farming weight next leaderboard position eta. -+ Added **Dicer Counter** - Count RNG drops for Melon Dicer and Pumpkin Dicer. -+ Added **Optimal Speed** - Show the optimal speed for your current tool in the hand. (Ty MelonKingDE for the values) ++ Added **Dicer Counter** + + Count RNG drops for Melon Dicer and Pumpkin Dicer. ++ Added **Optimal Speed** + + Show the optimal speed for your current tool in the hand. (Ty MelonKingDE for the values) + Also available to select directly in the rancher boots overlay (contributed by nea) -+ Added **Warn When Close** - Warn with title and sound when the next crop milestone upgrade happens in 5 seconds. Useful for switching to a different pet for leveling. -+ Added **Money per Hour** - Displays the money per hour YOU get with YOUR crop/minute value when selling the items to bazaar. ++ Added **Warn When Close** + + Warn with title and sound when the next crop milestone upgrade happens in 5 seconds + + Useful for switching to a different pet for leveling ++ Added **Money per Hour** + + Displays the money per hour YOU get with YOUR crop/minute value when selling the items to bazaar. + Added farming contest timer. + Added wrong fungi cutter mode warning. + Added show the price per garden experience inside the visitor gui. + Added support for mushroom cow pet perk. (Counting and updating mushroom collection when breaking crops with mushroom blocks, added extra gui for time till crop milestones) + Added blocks/second display to crop milestone gui and made all crop milestone gui elements customizable/toggleable. + Added farming armor drops counter. -+ Added **Colored Name** - Show the visitor name in the color of the rarity. -+ Added **Visitor Item Preview** - Show the base type for the required items next to new visitors (Note that some visitors may require any crop) -+ Added **Teleport Pad Compact Name** - Hide the 'Warp to' and 'No Destination' texts over teleport pads. -+ Added **Money per Hour Advanced stats** - Show not only Sell Offer price but also Instant Sell price and NPC Sell price (Suggestion: Enable Compact Price as well for this) -+ Added **Anita Medal Profit** - Helps to identify profitable items to buy at the Anita item shop and potential profit from selling the item at the auction house. -+ Added **Composter Compact Display** - Displays the compost data from the tab list in a compact form as gui element. -+ Added **Composter Upgrade Price** - Show the price for the composter upgrade in the lore -+ Added **Highlight Upgrade** - Highlight Upgrades that can be bought right now. -+ Added **Number Composter Upgrades** - Show the number of upgrades in the composter upgrades inventory. -+ Added **Composter Inventory Numbers** - Show the amount of Organic Matter, Fuel and Composts Available while inside the composter inventory. -+ Added **True Farming Fortune - Displays** current farming fortune, including crop-specific bonuses. (contributed by appable) -+ Added **Tooltip Tweaks Compact Descriptions** - Hides redundant parts of reforge descriptions, generic counter description, and Farmhand perk explanation. (contributed by appable) -+ Added **Tooltip Tweaks Breakdown Hotkey** - When the keybind is pressed, show a breakdown of all fortune sources on a tool. (contributed by appable) -+ Added **Tooltip Tweaks Tooltip Format** - Show crop-specific farming fortune in tooltip. (contributed by appable) -+ Added command **/shcropspeedmeter** - Helps calculate the real farming fortune with the formula crops broken per block. -+ Added **Compost Low Notification** - Shows a notification as title when organic matter/fuel is low. -+ Added **Jacob's Contest Warning** - Show a warning shortly before a new jacob contest starts. -+ Added **Inventory Numbers** - Show the number of the teleport pads inside the 'Change Destination' inventory as stack size. -+ Added **Composter Overlay** - Show the cheapest items for organic matter and fuel, show profit per compost/hour/day and time per compost -+ Added **Composter Upgrades Overlay** - Show an overview of all composter stats, including time till organic matter and fuel is empty when fully filled and show a preview how these stats change when hovering over an upgrade ++ Added **Colored Name** + + Show the visitor name in the color of the rarity. ++ Added **Visitor Item Preview** + + Show the base type for the required items next to new visitors (Note that some visitors may require any crop) ++ Added **Teleport Pad Compact Name** + + Hide the 'Warp to' and 'No Destination' texts over teleport pads. ++ Added **Money per Hour Advanced stats** + + Show not only Sell Offer price but also Instant Sell price and NPC Sell price + + Suggestion: Enable Compact Price as well for this ++ Added **Anita Medal Profit** + + Helps to identify profitable items to buy at the Anita item shop and potential profit from selling the item at the auction house. ++ Added **Composter Compact Display** + + Displays the compost data from the tab list in a compact form as gui element. ++ Added **Composter Upgrade Price** + + Show the price for the composter upgrade in the lore ++ Added **Highlight Upgrade** + + Highlight Upgrades that can be bought right now. ++ Added **Number Composter Upgrades** + + Show the number of upgrades in the composter upgrades inventory. ++ Added **Composter Inventory Numbers** + + Show the amount of Organic Matter, Fuel and Composts Available while inside the composter inventory. ++ Added **True Farming Fortune + + Displays** current farming fortune, including crop-specific bonuses. (contributed by appable) ++ Added **Tooltip Tweaks Compact Descriptions** + + Hides redundant parts of reforge descriptions, generic counter description, and Farmhand perk explanation. (contributed by appable) ++ Added **Tooltip Tweaks Breakdown Hotkey** + + When the keybind is pressed, show a breakdown of all fortune sources on a tool. (contributed by appable) ++ Added **Tooltip Tweaks Tooltip Format** + + Show crop-specific farming fortune in tooltip. (contributed by appable) ++ Added command **/shcropspeedmeter** + + Helps calculate the real farming fortune with the formula crops broken per block. ++ Added **Compost Low Notification** + + Shows a notification as title when organic matter/fuel is low. ++ Added **Jacob's Contest Warning** + + Show a warning shortly before a new jacob contest starts. ++ Added **Inventory Numbers** + + Show the number of the teleport pads inside the 'Change Destination' inventory as stack size. ++ Added **Composter Overlay** + + Show the cheapest items for organic matter and fuel, show profit per compost/hour/day and time per compost ++ Added **Composter Upgrades Overlay** + + Show an overview of all composter stats, including time till organic matter and fuel is empty when fully filled and show a preview how these stats change when hovering over an upgrade + Hide crop money display, crop milestone display and garden visitor list while inside anita show, SkyMart or the composter inventory + Hide chat messages from the visitors in garden. (Except Beth and Spaceman) + Introduced a new command '/shcroptime ' that displays the estimated time it will take to gather the requested quantity of a particular item based on the current crop speed. + Show the average crop milestone in the crop milestone inventory. -+ Added **FF for Contest** - Show the minimum needed Farming Fortune for reaching a medal in the Jacob's Farming Contest inventory. -+ Added **yaw and pitch display** - Shows yaw and pitch with customizable precision while holding a farm tool. Automatically fades out if there is no movement for a customizable duration (Contributed by Sefer) ++ Added **FF for Contest** + + Show the minimum needed Farming Fortune for reaching a medal in the Jacob's Farming Contest inventory. ++ Added **yaw and pitch display** + + Shows yaw and pitch with customizable precision while holding a farm tool. Automatically fades out if there is no movement for a customizable duration (Contributed by Sefer) + Added warning when 6th visitors is ready (Contributed by CalMWolfs) ### Features from other Mods > *The following features are only there because I want them when testing SkyHanni features without other mods present.* + Added Hide explosions. -+ Added **Enderman Teleportation Hider** - Stops the enderman teleportation animation (Like in SBA) -+ Added **Fire Overlay Hider** - Hide the fire overlay (Like in Skytils) ++ Added **Enderman Teleportation Hider** + + Stops the enderman teleportation animation (Like in SBA) ++ Added **Fire Overlay Hider** + + Hide the fire overlay (Like in Skytils) ### Changes + Reworked reputation helper design in the crimson isle. @@ -222,9 +280,9 @@ + Fixed a bug that caused fire veil particle `hider/redline drawer` to not always detect the right click correctly. + Removed `Fixing Skytils custom Damage Splash` (Skytils has already fixed this bug. Additionally, this option enabled and skytils' damage splash disabled caused the hypixel damage splash to not show the tailing commas at all) + Fixed bug with particles that blocks NotEnoughUpdates' Fishing features. -+ Hopefully fixed incompatibility with skytils' hide cheap coins feature. ++ Hopefully fixed incompatibility with skytils `hide cheap coins` feature. + Fixed dungeon milestone messages getting wrongfully formatted. -+ Fixed bazaar features not working for items with an - (turbo farming books and triple strike) ++ Fixed bazaar features not working for items with an `-` (turbo farming books and triple strike) + Fixed Crab Hat of Celebration not being detected as an accessory correctly. + Added support for soopy's \[hand] feature -- cgit From 5b4611388c69fd9b2425334578ef51220a994dce Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 22:28:48 +0200 Subject: Version 0.18 --- CHANGELOG.md | 2 +- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd07d3685..7549bc4f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # SkyHanni - Change Log -## Version 0.18.BETA +## Version 0.18 (2023-06-19) ### New Features + Added **Visitor Drop Counter** (Contributed by CalMWolfs) diff --git a/build.gradle.kts b/build.gradle.kts index 36ac1ea6f..19b85e44d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.18.Beta.21" +version = "0.18" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 51d695899..73d136618 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -94,7 +94,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.18.Beta.21", + version = "0.18", ) class SkyHanniMod { @Mod.EventHandler -- cgit From 49914e950130c69c655f2506f8f070b93b0dc599 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 23:12:18 +0200 Subject: Give specific credits to Mayxo --- src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java index 53ebf93e1..b9270b03c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Bingo.java @@ -35,7 +35,7 @@ public class Bingo { @ConfigOption( name = "Show Guide", desc = "Show tips and difficulty for bingo goals inside the bingo card inventory.\n" + - "§7(§eData from Bingo Splash Community§7)" + "§eData from Bingo Splash Community§7, made by §cMayxo" ) @ConfigEditorBoolean public boolean bingoSplashGuide = true; -- cgit From 47ac0f99f9d482c3ab3baf794d9ebf03fbee3d6b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 23:13:24 +0200 Subject: typo --- FEATURES.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index 523d8bc1a..917f1c057 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -280,19 +280,19 @@ + SkyBlock Command `/tp` to check the play time still works ## Misc -- Allow to copy, paste, and mark selected text in signs (not visual, but it's working still) -- Pet Display (showing the currently selected pet as GUI element, without any fancy XP or level or percentage, but with auto-pet support) -- Hiding exp Bottles lying on the ground. -- **Real Time** - Display the current computer time, a handy feature when playing in full-screen mode. -- Highlight the voidling extremist in pink color. -- Highlight millenia aged blaze color in red -- Option to hide all damage splashes, from anywhere in Skyblock. -- Hide armor or just helmet of other player or yourself -- Display the active non-god potion effects. -- Wishing compass uses amount display. -- Brewing Stand Overlay. -- Crimson Isle Reputation Helper. -- Red Scoreboard Numbers - Hides the red numbers in the scoreboard sidebar on the right side of the screen. ++ Allow to copy, paste, and mark selected text in signs (not visual, but it's working still) ++ Pet Display (showing the currently selected pet as GUI element, without any fancy XP or level or percentage, but with auto-pet support) ++ Hiding exp Bottles lying on the ground. ++ **Real Time** - Display the current computer time, a handy feature when playing in full-screen mode. ++ Highlight the voidling extremist in pink color. ++ Highlight millenia aged blaze color in red ++ Option to hide all damage splashes, from anywhere in Skyblock. ++ Hide armor or just helmet of other player or yourself ++ Display the active non-god potion effects. ++ Wishing compass uses amount display. ++ Brewing Stand Overlay. ++ Crimson Isle Reputation Helper. ++ Red Scoreboard Numbers - Hides the red numbers in the scoreboard sidebar on the right side of the screen. + **Tia Relay Waypoint** - Show the next Relay waypoint for Tia The Fairy, where maintenance for the abiphone network needs to be done. + **Tia Relay Helper** - Helps with solving the sound puzzle. + **Hide dead entities** - Similar to Skytil's feature for inside dungeon, but for everywhere. -- cgit From 3e7aa9855489888283b6c53ce14002fe38d04dbe Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 22 Jun 2023 13:00:47 +0200 Subject: better error handling --- .../hannibal2/skyhanni/config/commands/Commands.kt | 8 +-- .../skyhanni/config/commands/SimpleCommand.java | 9 ++- .../hannibal2/skyhanni/data/EntityMovementData.kt | 2 - .../at/hannibal2/skyhanni/data/MayorElection.kt | 9 +-- .../at/hannibal2/skyhanni/data/repo/RepoManager.kt | 5 +- .../at/hannibal2/skyhanni/data/repo/RepoUtils.kt | 18 +++--- .../skyhanni/events/RepositoryReloadEvent.kt | 7 ++- .../skyhanni/test/command/CopyErrorCommand.kt | 73 +++++++++++++++++++--- 8 files changed, 94 insertions(+), 37 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index ebcb72d28..59b850784 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -125,9 +125,9 @@ object Commands { } private fun createCommand(function: (Array) -> Unit) = - object : ProcessCommandRunnable() { - override fun processCommand(sender: ICommandSender?, args: Array) { - function(args.asList().toTypedArray()) - } + object : ProcessCommandRunnable() { + override fun processCommand(sender: ICommandSender?, args: Array) { + function(args.asList().toTypedArray()) } + } } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.java b/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.java index 25e3ba97b..fa2c310de 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.java +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/SimpleCommand.java @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.config.commands; +import at.hannibal2.skyhanni.test.command.CopyErrorCommand; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; import net.minecraft.util.BlockPos; @@ -7,7 +8,7 @@ import net.minecraft.util.BlockPos; import java.util.List; /** - @author Moulberry + * @author Moulberry **/ public class SimpleCommand extends CommandBase { @@ -50,7 +51,11 @@ public class SimpleCommand extends CommandBase { @Override public void processCommand(ICommandSender sender, String[] args) { - runnable.processCommand(sender, args); + try { + runnable.processCommand(sender, args); + } catch (Throwable e) { + CopyErrorCommand.INSTANCE.logError(e, "Error while running command /" + commandName); + } } @Override diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt index 30f88f48e..b5a2d2b92 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt @@ -21,8 +21,6 @@ class EntityMovementData { } } - var tick = 0 - @SubscribeEvent fun onTick(event: TickEvent.ClientTickEvent) { if (!LorenzUtils.inSkyBlock) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt index ddd208db1..7c4cfd7c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorElection.kt @@ -1,11 +1,10 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.utils.APIUtil import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.jsonobjects.MayorJson -import com.google.gson.GsonBuilder -import io.github.moulberry.moulconfig.observer.PropertyTypeAdapterFactory import io.github.moulberry.notenoughupdates.util.SkyBlockTime import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -17,10 +16,6 @@ class MayorElection { private var tick = 0 private var lastUpdate = 0L - private val gson = GsonBuilder().setPrettyPrinting() - .registerTypeAdapterFactory(PropertyTypeAdapterFactory()) - .create() - companion object { var rawMayorData: MayorJson? = null var candidates = mapOf() @@ -52,7 +47,7 @@ class MayorElection { SkyHanniMod.coroutineScope.launch { val url = "https://api.hypixel.net/resources/skyblock/election" val jsonObject = withContext(Dispatchers.IO) { APIUtil.getJSONResponse(url) } - rawMayorData = gson.fromJson(jsonObject, MayorJson::class.java) + rawMayorData = ConfigManager.gson.fromJson(jsonObject, MayorJson::class.java) val data = rawMayorData ?: return@launch val map = mutableMapOf() map put data.mayor.election.getPairs() diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index 2dc65f358..e1d6aa933 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -1,10 +1,9 @@ package at.hannibal2.skyhanni.data.repo import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.utils.LorenzUtils -import com.google.gson.Gson -import com.google.gson.GsonBuilder import com.google.gson.JsonObject import net.minecraft.client.Minecraft import org.apache.commons.io.FileUtils @@ -15,7 +14,7 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.atomic.AtomicBoolean class RepoManager(private val configLocation: File) { - val gson: Gson = GsonBuilder().setPrettyPrinting().create() + private val gson get() = ConfigManager.gson private var latestRepoCommit: String? = null private val repoLocation: File = File(configLocation, "repo") diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt index 3e67adcac..9719c70ff 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt @@ -79,17 +79,13 @@ object RepoUtils { fun getConstant(repo: File, constant: String, gson: Gson, clazz: Class?): T? { if (repo.exists()) { val jsonFile = File(repo, "constants/$constant.json") - try { - BufferedReader( - InputStreamReader( - FileInputStream(jsonFile), - StandardCharsets.UTF_8 - ) - ).use { reader -> - return gson.fromJson(reader, clazz) - } - } catch (e: Exception) { - return null + BufferedReader( + InputStreamReader( + FileInputStream(jsonFile), + StandardCharsets.UTF_8 + ) + ).use { reader -> + return gson.fromJson(reader, clazz) } } return null diff --git a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt index 5cfd59aa1..39d187326 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events import at.hannibal2.skyhanni.data.repo.RepoUtils +import at.hannibal2.skyhanni.test.command.CopyErrorCommand import com.google.gson.Gson import com.google.gson.JsonObject import java.io.File @@ -8,6 +9,10 @@ import java.io.File class RepositoryReloadEvent(val repoLocation: File, val gson: Gson): LorenzEvent() { fun getConstant(constant: String) = getConstant(constant) - inline fun getConstant(constant: String) = + inline fun getConstant(constant: String) = try { RepoUtils.getConstant(repoLocation, constant, gson, T::class.java) + } catch (e: Exception) { + CopyErrorCommand.logError(Exception("Repo parsing error while trying to read constant '$constant'", e), "Error reading repo data") + null + } } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt index a8c6660f3..575a2e4fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt @@ -4,12 +4,14 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils import com.google.common.cache.CacheBuilder +import net.minecraft.client.Minecraft import java.util.* import java.util.concurrent.TimeUnit object CopyErrorCommand { // random id -> error message private val errorMessages = mutableMapOf() + private val fullErrorMessages = mutableMapOf() private var cache = CacheBuilder.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build, Unit>() @@ -20,22 +22,34 @@ object CopyErrorCommand { return } - LorenzUtils.chat(errorMessages[array[0]]?.let { + val id = array[0] + val fullErrorMessage = LorenzUtils.isControlKeyDown() + val errorMessage = if (fullErrorMessage) { + fullErrorMessages[id] + } else { + errorMessages[id] + } + val name = if (fullErrorMessage) "Ful error" else "Error" + LorenzUtils.chat(errorMessage?.let { OSUtils.copyToClipboard(it) - "§e[SkyHanni] Error copied into the clipboard, please report it on the SkyHanni discord!" + "§e[SkyHanni] $name copied into the clipboard, please report it on the SkyHanni discord!" } ?: "§c[SkyHanni] Error id not found!") } fun logError(error: Throwable, message: String) { + Minecraft.getMinecraft().thePlayer ?: throw Error(message, error) + val pair = error.stackTrace[0].let { it.fileName to it.lineNumber } - if (cache.getIfPresent(pair) != null) return +// if (cache.getIfPresent(pair) != null) return cache.put(pair, Unit) - val stackTrace = error.stackTraceToString().removeSpam() + val fullStackTrace = error.getExactStackTrace(true).joinToString("\n") + val stackTrace = error.getExactStackTrace(false).joinToString("\n").removeSpam() val randomId = UUID.randomUUID().toString() - errorMessages[randomId] = - "```\nSkyHanni ${SkyHanniMod.version}: $message\n \n$stackTrace```" + errorMessages[randomId] = "```\nSkyHanni ${SkyHanniMod.version}: $message\n \n$stackTrace\n```" + fullErrorMessages[randomId] = + "```\nSkyHanni ${SkyHanniMod.version}: $message\n(full stack trace)\n \n$fullStackTrace\n```" LorenzUtils.clickableChat( "§c[SkyHanni ${SkyHanniMod.version}]: $message. Click here to copy the error into the clipboard.", @@ -44,12 +58,57 @@ object CopyErrorCommand { } } +private fun Throwable.getExactStackTrace(full: Boolean, parent: List = emptyList()): List = buildList { + add("Caused by " + javaClass.name + ": $message") + + val breakAfter = listOf( + "at net.minecraftforge.client.ClientCommandHandler.executeCommand(", + ) + val replace = mapOf( + "io.mouberry,notenoughupdates" to "NEU", + "at.hannibal2.skyhanni" to "SH", + ) + + for (traceElement in stackTrace) { + var text = "\tat $traceElement" + if (!full) { + if (text in parent) { + println("broke at: $text") + break + } + } + if (!full) { + for ((from, to) in replace) { + text = text.replace(from, to) + } + } + add(text) + if (!full) { + if (breakAfter.any { text.contains(it) }) { + println("breakAfter: $text") + break + } + } + } + + cause?.let { + addAll(it.getExactStackTrace(full, this)) + } +} + private fun String.removeSpam(): String { val ignored = listOf( "at io.netty.", "at net.minecraft.network.", "at net.minecraftforge.fml.common.network.handshake.", "at java.lang.Thread.run", + "at com.google.gson.internal.", + "at net.minecraftforge.fml.common.eventhandler.", + "at java.util.concurrent.", + "at sun.reflect.", + "at net.minecraft.client.Minecraft.addScheduledTask(", + "at java.lang.reflect.", + "at at.hannibal2.skyhanni.config.commands.Commands\$", ) - return split("\r\n\t").filter { line -> !ignored.any { line.startsWith(it) } }.joinToString("\n") + return split("\n").filter { line -> !ignored.any { line.contains(it) } }.joinToString("\n") } -- cgit From 13c636ff4ad49403c078b208dabd0b87972b0440 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 22 Jun 2023 14:23:26 +0200 Subject: Added rift timer --- CHANGELOG.md | 6 ++ FEATURES.md | 4 + src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../at/hannibal2/skyhanni/config/Features.java | 4 + .../skyhanni/config/features/RiftConfig.java | 37 ++++++++ .../java/at/hannibal2/skyhanni/data/IslandType.kt | 1 + .../hannibal2/skyhanni/features/rift/RiftTimer.kt | 99 ++++++++++++++++++++++ .../at/hannibal2/skyhanni/utils/LorenzUtils.kt | 9 ++ 8 files changed, 162 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 7549bc4f4..9c884a6f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # SkyHanni - Change Log +## Version 0.19 (unreleased) + +### New Features ++ Added **Rift Timer** + + Show the remaining rift time, max time, percentage, and extra time changes. + ## Version 0.18 (2023-06-19) ### New Features diff --git a/FEATURES.md b/FEATURES.md index 917f1c057..6d71d09e0 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -270,6 +270,10 @@ + Show a warning when finding a **visitor with a rare reward** + Show message in chat, over the visitor and prevents refusing +## The Rift ++ **Rift Timer** + + Show the remaining rift time, max time, percentage, and extra time changes. + ## Commands + **/wiki ** - using hypixel-skyblock.fandom.com instead of Hypixel wiki. + **/shmarkplayer ** - marking a player with yellow color. diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 73d136618..cf099e987 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -59,6 +59,7 @@ import at.hannibal2.skyhanni.features.mobs.AshfangMinisNametagHider import at.hannibal2.skyhanni.features.mobs.MobHighlight import at.hannibal2.skyhanni.features.nether.ashfang.* import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper +import at.hannibal2.skyhanni.features.rift.RiftTimer import at.hannibal2.skyhanni.features.slayer.* import at.hannibal2.skyhanni.features.slayer.blaze.BlazeSlayerClearView import at.hannibal2.skyhanni.features.slayer.blaze.BlazeSlayerDaggerHelper @@ -300,6 +301,7 @@ class SkyHanniMod { loadModule(ShowItemUuid()) loadModule(SlayerRngMeterDisplay()) loadModule(GhostCounter) + loadModule(RiftTimer()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index d80195e71..a5a42b48c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -119,6 +119,10 @@ public class Features extends Config { @Category(name = "Ghost Counter", desc = "Ghost Counter settings.") public GhostCounter ghostCounter = new GhostCounter(); + @Expose + @Category(name = "The Rift", desc = "Features for The Rift dimension.") + public RiftConfig rift = new RiftConfig(); + @Expose @Category(name = "Misc", desc = "Settings without a category.") public Misc misc = new Misc(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java new file mode 100644 index 000000000..581413ec0 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/RiftConfig.java @@ -0,0 +1,37 @@ +package at.hannibal2.skyhanni.config.features; + +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class RiftConfig { + + @ConfigOption(name = "Rift Timer", desc = "") + @Accordion + @Expose + public TimerConfig timer = new TimerConfig(); + + public static class TimerConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show the remaining rift time, max time, percentage, and extra time changes.") + @ConfigEditorBoolean + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Max time", desc = "Show max time.") + @ConfigEditorBoolean + public boolean maxTime = true; + + @Expose + @ConfigOption(name = "Percentage", desc = "Show percentage.") + @ConfigEditorBoolean + public boolean percentage = true; + + @Expose + public Position timerPosition = new Position(10, 10, false, true); + + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt index 8b9c4dc3e..d3357e880 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt @@ -18,6 +18,7 @@ enum class IslandType(val displayName: String, val apiName: String = "null") { GARDEN("Garden"), GARDEN_GUEST("Garden Guest"), SPIDER_DEN("Spider's Den"), + THE_RIFT("The Rift"), NONE(""), UNKNOWN("???"), diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt new file mode 100644 index 000000000..d1fcc758d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt @@ -0,0 +1,99 @@ +package at.hannibal2.skyhanni.features.rift + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.events.ConfigLoadEvent +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.LorenzActionBarEvent +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings +import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.TimeUtils +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class RiftTimer { + private val config get() = SkyHanniMod.feature.rift.timer + private var display = listOf() + private var maxTime = 0L + private var latestTime = 0L + private val changes = mutableMapOf() + + @SubscribeEvent + fun onConfigLoad(event: ConfigLoadEvent) { + display = emptyList() + } + + @SubscribeEvent + fun onChatMessage(event: LorenzChatEvent) { + if (!isEnabled()) return + + val message = event.message + " §r§7You have §r§a(?