diff options
26 files changed, 395 insertions, 38 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d92e6e..8b7abf98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,87 @@ +# Release 1.21.0 + +## Highlight +* Chocolate factory helper +* Calendar Event Notifications +* Glacite Tunnels Cold Overlay +* Add onscreen info for specific items and menus like pet level (slot text) +* Config reordering +* Waypoints for commissions in dwarven mines and glacite +* Sign calculator +* Block Incorrect Terminal Clicks +* Hide Soulweaver Skulls +* Compact damage +* 2 Extra Tabs in Quick Nav +* Vanilla health/xp and fancy bar shown in parallel now possible +* Highlight chest in three weirdos +* Visitor helper copy amount to clipboard +* Search overlay improvement (better pet search, dungeon stars) +* Farming hud improvement (coins per hour) +* Waypoints UI config + +## What's Changed +* Fixes and things by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/675 +* Fixes to Garden UI by @BigloBot in https://github.com/SkyblockerMod/Skyblocker/pull/682 +* 1.20.5 & 1.20.6 by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/669 +* Ultimate config reconfiguration by @LifeIsAParadox in https://github.com/SkyblockerMod/Skyblocker/pull/697 +* Nothing to see here, part 2 by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/698 +* ??? by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/699 +* Add a way to show all ordered waypoints at once by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/688 +* Adds Mines Slayer starter commission and deprecates the classic hud for removal by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/692 +* Fix accessories helper not working with only 1 accessory bag page by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/693 +* Config Data Fixer by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/701 +* Fix quite important AH bug by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/689 +* add waypoints for commissions in dwarven mines and glacite. by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/690 +* Add line smoothener by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/711 +* Sign calculator by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/686 +* Block Incorrect Terminal Clicks by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/710 +* Hide Soulweaver Skulls by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/702 +* Add compact damage by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/696 +* Clarify the regex in CompactDamage by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/712 +* Internal Staging by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/715 +* Add LOCATION_CHANGE event, fired upon parsing /locraw by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/716 +* Quick Nav Refactor and Clean Up, 2 Extra Tabs, Config Version 3, Config Data Fixer Refactor, Debug Dump Hovered Item Tool by @VeritasDL in https://github.com/SkyblockerMod/Skyblocker/pull/643 +* Fancy status bars bits and pieces by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/704 +* Migrate ThreeWeirdos to DungeonPuzzle and highlight chest by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/705 +* fix bugs by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/720 +* Make TerminalSolver interface & ExperimentSolver class sealed by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/722 +* Add chocolate factory helper by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/683 +* Glacite Overlay (Oops) by @f3shqt in https://github.com/SkyblockerMod/Skyblocker/pull/703 +* chat rules - fix bugs + refactor by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/719 +* Remove extended quicknav string by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/725 +* Debug class? More like Rebug class lmao gottem by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/730 +* Update chocolate factory for chocolate factory 2 by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/734 +* Fix egg found message being sent twice by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/729 +* Fix off-by-one on cf by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/741 +* Fix entrance (0) not being in the map by @Julienraptor01 in https://github.com/SkyblockerMod/Skyblocker/pull/732 +* VisitorHelper Tweak by @UpFault in https://github.com/SkyblockerMod/Skyblocker/pull/736 +* Improve search overlay by @olim88 in https://github.com/SkyblockerMod/Skyblocker/pull/739 +* Calendar Event Notifications by @viciscat in https://github.com/SkyblockerMod/Skyblocker/pull/691 +* add locations to egg hunt by @BigloBot in https://github.com/SkyblockerMod/Skyblocker/pull/746 +* Farming hud improvements by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/685 +* Tooltip refactors by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/735 +* Misc Changes by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/755 +* Refactor Tooltips and Slot Texts by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/750 +* Update jar name and add build type by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/757 +* Fix CatacombsLevelAdder not working at max class levels by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/756 +* A couple of chocolate factory fixes by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/749 +* Waypoints by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/713 +* Add event notifications criterion by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/763 +* Fix egg finder sharing nonsense by @Julienraptor01 in https://github.com/SkyblockerMod/Skyblocker/pull/771 +* Switch metal detector regex from matches to find by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/767 +* Add docs to ItemTooltip#getNeuName and ItemRepository#getItemStack and fix farming hud icon stack id by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/772 +* Switch colour check for exotic tooltip by @kevinthegreat1 in https://github.com/SkyblockerMod/Skyblocker/pull/773 +* YetAnotherChocoFactoFix by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/774 +* Use NPC price if its higher by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/775 +* Fix Search Overlay NPE by @AzureAaron in https://github.com/SkyblockerMod/Skyblocker/pull/778 + +## New Contributors +* @BigloBot made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/682 +* @f3shqt made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/703 +* @UpFault made their first contribution in https://github.com/SkyblockerMod/Skyblocker/pull/736 + +**Full Changelog**: https://github.com/SkyblockerMod/Skyblocker/compare/v1.20.2...v1.21.0 +___ # Release 1.20.2 ## Highlight diff --git a/FEATURES.md b/FEATURES.md index ff0f0bb6..b4214eec 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -32,6 +32,8 @@ - **Resourcepack recoloring textures in dungeons** - **score title and sound** - **Prevent teammates glow during Livid** +- **Block Incorrect Terminal Clicks** +- **Hide Soulweaver Skulls** ### Kuudra Features - **Kuudra waypoints** @@ -55,6 +57,7 @@ - *Mana* - *Defense* - *XP* +- **Vanilla health/xp and fancy bar shown in parallel** ### Dwarven Mines / Crystal Hollows / Glacite Mining: - **Dwarven Mines Solver:** @@ -69,6 +72,8 @@ - *Find locations in chat messages* - *Share waypoints* - Metal detector helper +- **Glacite Tunnels** + - **Cold Overlay** - **Commission HUD** - *Provides information on Dwarven Mines / Crystal Hollows / Glacite Mining quests* - **Powder HUD** @@ -95,12 +100,22 @@ ### Garden Features: - **Farming HUD** + - Counter + - Crops/min + - Coins/h + - Blocks/s + - Farming Level + - Farming XP/h + - Yaw and Pitch - **Visitor Helper** - Buy items that visitors require from bazaar by clicking the text + - Copy amount to clipboard - **Disable title and chat messages for Melon/Pumpkin Dicer** - **Basic garden mouse locking feature (set mouse sensitivity to 0)** ### Visual Enhancements: +- **Compact damage** +- **Waypoints for commissions in dwarven mines and glacite tunnels** - **Fancy Tab HUD:** Fully configurable with a resource pack. - **1.8 Hitbox for Lever and Farmland** - **Hide Status Effect Overlay** @@ -122,7 +137,22 @@ ### User Interface Enhancements: - **Search overlays for bz and ah** -- **Attribute Shard Info Display** +- **Slot Text** + - **Attribute Shard Info Display** + - **Catacombs level** + - **Collection level** + - **Enchantment book level** + - **Minion level** + - **Pet level** + - **Potion level** + - **Prehistoric egg blocks walked** + - **Rancher's boots speed cap** + - **Skill level** + - **Skyblock level** + - **Essence Shop** + - **Your Essence** + - **Power Stone Guide** + - **Stats Tuning** - **Drill Fuel and Pickonimbus 2000 in Item Durability Bar** - **Hotbar Slot Lock Keybind:** Select the hotbar slot you want to lock/unlock and press the lock button. - **Item Tooltip:** (Provides information on) @@ -141,6 +171,8 @@ - **Fancy Crafting Table** - **Info Screen** - **Fancy Auctions Browser** +- **Calendar Event Notifications** +- **Sign calculator** ### Barn Features: - **Barn Solver:** @@ -167,6 +199,7 @@ - Fishing rod timer (change color after 20 seconds) - Hide other rods - **Mythological Ritual Helper** +- **Chocolate factory Helper** ### Miscellaneous Features: - **[Roughly Enough Items (REI)](https://modrinth.com/mod/rei) and [EMI](https://modrinth.com/mod/emi) Support** @@ -52,6 +52,8 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - **Resourcepack recoloring textures in dungeons** - **score title and sound** - **Prevent teammates glow during Livid** +- **Block Incorrect Terminal Clicks** +- **Hide Soulweaver Skulls** ### Kuudra Features - **Kuudra waypoints** @@ -75,6 +77,7 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - *Mana* - *Defense* - *XP* +- **Vanilla health/xp and fancy bar shown in parallel** ### Dwarven Mines / Crystal Hollows / Glacite Mining: - **Dwarven Mines Solver:** @@ -89,6 +92,8 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - *Find locations in chat messages* - *Share waypoints* - Metal detector helper +- **Glacite Tunnels** + - **Cold Overlay** - **Commission HUD** - *Provides information on Dwarven Mines / Crystal Hollows / Glacite Mining quests* - **Powder HUD** @@ -115,12 +120,22 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in ### Garden Features: - **Farming HUD** + - Counter + - Crops/min + - Coins/h + - Blocks/s + - Farming Level + - Farming XP/h + - Yaw and Pitch - **Visitor Helper** - Buy items that visitors require from bazaar by clicking the text + - Copy amount to clipboard - **Disable title and chat messages for Melon/Pumpkin Dicer** - **Basic garden mouse locking feature (set mouse sensitivity to 0)** ### Visual Enhancements: +- **Compact damage** +- **Waypoints for commissions in dwarven mines and glacite tunnels** - **Fancy Tab HUD:** Fully configurable with a resource pack. - **1.8 Hitbox for Lever and Farmland** - **Hide Status Effect Overlay** @@ -142,7 +157,22 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in ### User Interface Enhancements: - **Search overlays for bz and ah** -- **Attribute Shard Info Display** +- **Slot Text** + - **Attribute Shard Info Display** + - **Catacombs level** + - **Collection level** + - **Enchantment book level** + - **Minion level** + - **Pet level** + - **Potion level** + - **Prehistoric egg blocks walked** + - **Rancher's boots speed cap** + - **Skill level** + - **Skyblock level** + - **Essence Shop** + - **Your Essence** + - **Power Stone Guide** + - **Stats Tuning** - **Drill Fuel and Pickonimbus 2000 in Item Durability Bar** - **Hotbar Slot Lock Keybind:** Select the hotbar slot you want to lock/unlock and press the lock button. - **Item Tooltip:** (Provides information on) @@ -161,6 +191,8 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - **Fancy Crafting Table** - **Info Screen** - **Fancy Auctions Browser** +- **Calendar Event Notifications** +- **Sign calculator** ### Barn Features: - **Barn Solver:** @@ -187,6 +219,7 @@ Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/in - Fishing rod timer (change color after 20 seconds) - Hide other rods - **Mythological Ritual Helper** +- **Chocolate factory Helper** ### Miscellaneous Features: - **[Roughly Enough Items (REI)](https://modrinth.com/mod/rei) and [EMI](https://modrinth.com/mod/emi) Support** @@ -284,9 +317,9 @@ information. |----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| | [Ghost-3](https://github.com/Ghost-3) | [esteban4567890](https://github.com/esteban4567890) | [Fluboxer](https://github.com/Fluboxer) | [VeritasDL](https://github.com/VeritasDL) | -| [<img alt="TheDearbear" src="https://github.com/TheDearbear.png" width="100">](https://github.com/TheDearbear) | -|----------------------------------------------------------------------------------------------------------------| -| [TheDearbear](https://github.com/TheDearbear) | +| [<img alt="TheDearbear" src="https://github.com/TheDearbear.png" width="100">](https://github.com/TheDearbear) | [<img alt="BigloBot" src="https://github.com/BigloBot.png" width="100">](https://github.com/BigloBot) | [<img alt="f3shqt" src="https://github.com/f3shqt.png" width="100">](https://github.com/f3shqt) | [<img alt="UpFault" src="https://github.com/UpFault.png" width="100">](https://github.com/UpFault) | +|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------| +| [TheDearbear](https://github.com/TheDearbear) | [BigloBot](https://github.com/BigloBot) | [f3shqt](https://github.com/f3shqt) | [UpFault](https://github.com/UpFault) | ### Translators @@ -294,9 +327,9 @@ German ([LifeIsAParadox](https://github.com/LifeIsAParadox) & [msg-programs](htt Indonesian ([null2264](https://github.com/null2264)) \ Russian ([HyperSoop](https://github.com/HyperSoop) & [CrimsonIsle](https://github.com/CrimsonIsle) & [Ghost-3](https://github.com/Ghost-3) & [wilson-wtf](https://github.com/wilson-wtf) & [R2kip](https://github.com/R2kip) & [Kolobok125040](https://github.com/Kolobok125040))\ French ([edgarogh](https://github.com/edgarogh) & [Julienraptor01](https://github.com/Julienraptor01) & [viciscat](https://github.com/viciscat) & [Kiverty](https://github.com/Kiverty) & [maDU59](https://github.com/maDU59)) \ -Japanese ([hirochisan](https://github.com/hirochisan)) \ -Chinese ([catandA](https://github.com/catandA)) \ -Chinese (Simplified) ([catandA](https://github.com/catandA) & [PumpkinXD](https://github.com/PumpkinXD) & [user123321111](https://github.com/user123321111) & [sunnytia](https://github.com/sunnytia) & [AC19970](https://github.com/AC19970)) \ +Japanese ([hirochisan](https://github.com/hirochisan) & [AC19970](https://github.com/AC19970)) \ +Chinese ([catandA](https://github.com/catandA) & [AC19970](https://github.com/AC19970)) \ +Chinese (Simplified) ([catandA](https://github.com/catandA) & [PumpkinXD](https://github.com/PumpkinXD) & [user123321111](https://github.com/user123321111) & [sunnytia](https://github.com/sunnytia) & [AC19970](https://github.com/AC19970) & [x-yingcan-x](https://github.com/x-yingcan-x)) \ Korean ([lantice3720](https://github.com/lantice3720)) \ Spanish ([IngeSebastian](https://github.com/IngeSebastian)) \ Norwegian Bokmål ([KdGaming0](https://github.com/KdGaming0)) \ @@ -305,4 +338,5 @@ Turkish ([Fix3dll](https://github.com/Fix3dll) & [Emirlol](https://github.com/Em Canadian English ([AzureAaron](https://github.com/AzureAaron)) \ Portuguese (Brazil) ([OhRetro](https://github.com/OhRetro) & [AurinVPK](https://github.com/AurinVPK) & [yFelipeMC](https://github.com/yFelipeMC)) \ Dutch ([mitch030504](https://github.com/mitch030504)) \ -Italian ([Vricken](https://github.com/Vricken))
\ No newline at end of file +Italian ([Vricken](https://github.com/Vricken)) \ +Polish ([danehcan](https://github.com/danehcan))
\ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 77075ae7..5eb4a8fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ fabric_api_version=0.100.0+1.20.6 # Minecraft Mods ## YACL (https://github.com/isXander/YetAnotherConfigLib) -yacl_version=3.4.4+1.20.6 +yacl_version=3.5.0+1.20.6 ## Mod Menu (https://modrinth.com/mod/modmenu/versions) mod_menu_version = 10.0.0-beta.1 ## REI (https://modrinth.com/mod/rei/versions?l=fabric) @@ -34,7 +34,7 @@ jgit_version = 6.9.0.202403050737-r commons_math_version = 3.6.1 # Mod Properties -mod_version = 1.20.2 +mod_version = 1.21.0 maven_group = de.hysky archives_base_name = skyblocker modrinth_id=y6DuFGwJ diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java index 2cf0ea9d..9ca9953b 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHud.java @@ -1,6 +1,7 @@ package de.hysky.skyblocker.skyblock.dwarven; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.config.configs.MiningConfig; import de.hysky.skyblocker.events.HudRenderEvents; import de.hysky.skyblocker.mixins.accessors.PlayerListHudAccessor; import de.hysky.skyblocker.skyblock.tabhud.util.Colors; @@ -164,7 +165,9 @@ public class DwarvenHud { public static void update() { if (CLIENT.player == null || CLIENT.getNetworkHandler() == null - || !SkyblockerConfigManager.get().mining.dwarvenHud.enabledCommissions && !SkyblockerConfigManager.get().mining.dwarvenHud.enabledPowder + || !SkyblockerConfigManager.get().mining.dwarvenHud.enabledCommissions + && !SkyblockerConfigManager.get().mining.dwarvenHud.enabledPowder + && SkyblockerConfigManager.get().mining.commissionWaypoints.mode == MiningConfig.CommissionWaypointMode.OFF || !Utils.isInCrystalHollows() && !Utils.isInDwarvenMines()) { return; } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/fancybars/StatusBarsConfigScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/fancybars/StatusBarsConfigScreen.java index df072710..0a9b2b7a 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/fancybars/StatusBarsConfigScreen.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/fancybars/StatusBarsConfigScreen.java @@ -293,6 +293,7 @@ public class StatusBarsConfigScreen extends Screen { if (button == 0) { cursorBar = statusBar; cursorBar.inMouse = true; + currentInsertLocation = BarLocation.of(cursorBar); if (statusBar.anchor != null) FancyStatusBars.barPositioner.removeBar(statusBar.anchor, statusBar.gridY, statusBar); FancyStatusBars.updatePositions(); @@ -322,6 +323,7 @@ public class StatusBarsConfigScreen extends Screen { public boolean mouseReleased(double mouseX, double mouseY, int button) { if (cursorBar != null) { cursorBar.inMouse = false; + currentInsertLocation = BarLocation.of(cursorBar); cursorBar = null; FancyStatusBars.updatePositions(); checkNullAnchor(FancyStatusBars.statusBars.values()); diff --git a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java index b845e07a..5837ea20 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java @@ -135,7 +135,7 @@ public class FarmingHud { } public enum CounterType { - NONE("", "No Counter: "), + NONE("", "No Counter"), COUNTER("mined_crops", "Counter: "), CULTIVATING("farmed_cultivating", "Cultivating Counter: "); @@ -146,5 +146,8 @@ public class FarmingHud { this.nbtKey = nbtKey; this.text = text; } + public boolean matchesText(String textToMatch) { + return this.text.equals(textToMatch); + } } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java index c413ad44..84013f0b 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java @@ -66,7 +66,10 @@ public class FarmingHudWidget extends Widget { String cropItemId = FARMING_TOOLS.get(ItemUtils.getItemId(farmingToolStack)); ItemStack cropStack = ItemRepository.getItemStack(ItemTooltip.getNeuName(cropItemId, cropItemId)); // The cropItemId is being used as the api id in the second parameter because the skyblock id and api id are the same for all crops. - addSimpleIcoText(cropStack, FarmingHud.counterText(), Formatting.YELLOW, FarmingHud.NUMBER_FORMAT.format(FarmingHud.counter())); + String counterText = FarmingHud.counterText(); + String counterNumber = FarmingHud.NUMBER_FORMAT.format(FarmingHud.counter()); + if (FarmingHud.CounterType.NONE.matchesText(counterText)) counterNumber = ""; + addSimpleIcoText(cropStack, counterText, Formatting.YELLOW, counterNumber); float cropsPerMinute = FarmingHud.cropsPerMinute(); addSimpleIcoText(cropStack, "Crops/min: ", Formatting.YELLOW, FarmingHud.NUMBER_FORMAT.format((int) cropsPerMinute / 10 * 10)); addSimpleIcoText(Ico.GOLD, "Coins/h: ", Formatting.GOLD, getPriceText(cropItemId, cropsPerMinute)); diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java index 18131527..d3941d77 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java @@ -13,6 +13,7 @@ import java.util.List; public class SlotTextManager { private static final SlotTextAdder[] adders = new SlotTextAdder[]{ + new EssenceShopAdder(), new EnchantmentLevelAdder(), new MinionLevelAdder(), new PetLevelAdder(), @@ -26,7 +27,10 @@ public class SlotTextManager { new PrehistoricEggAdder(), new PotionLevelAdder(), new CollectionAdder(), - new CommunityShopAdder() + new CommunityShopAdder(), + new YourEssenceAdder(), + new PowerStonesGuideAdder(), + new StatsTuningAdder() }; private static final ArrayList<SlotTextAdder> currentScreenAdders = new ArrayList<>(); diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/AttributeShardAdder.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/AttributeShardAdder.java index 811677d7..81f543f8 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/AttributeShardAdder.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/AttributeShardAdder.java @@ -85,8 +85,8 @@ public class AttributeShardAdder extends SlotTextAdder { String attributeInitials = ID_2_SHORT_NAME.getOrDefault(attributeId, ""); return List.of( - SlotText.bottomRight(Text.literal(String.valueOf(attributeLevel)).withColor(0x34eb77)), - SlotText.topLeft(Text.literal(attributeInitials).formatted(Formatting.AQUA)) + SlotText.bottomRight(Text.literal(String.valueOf(attributeLevel)).withColor(0xFFDDC1)), + SlotText.topLeft(Text.literal(attributeInitials).withColor(0xCFF8F8)) ); } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CatacombsLevelAdder.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CatacombsLevelAdder.java index da12e867..6c99ebf9 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CatacombsLevelAdder.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CatacombsLevelAdder.java @@ -44,7 +44,7 @@ public class CatacombsLevelAdder { level = String.valueOf(RomanNumerals.romanToDecimal(roman)); } - return List.of(SlotText.bottomLeft(Text.literal(level).formatted(Formatting.RED))); + return List.of(SlotText.bottomLeft(Text.literal(level).withColor(0xFFDDC1))); } default -> { return List.of(); @@ -65,7 +65,7 @@ public class CatacombsLevelAdder { case 11, 12, 13, 14, 15 -> { String level = getBracketedLevelFromName(slot.getStack()); if (!NumberUtils.isDigits(level)) return List.of(); - return List.of(SlotText.bottomLeft(Text.literal(level).formatted(Formatting.RED))); + return List.of(SlotText.bottomLeft(Text.literal(level).withColor(0xFFDDC1))); } default -> { return List.of(); @@ -86,7 +86,7 @@ public class CatacombsLevelAdder { case 29, 30, 31, 32, 33 -> { String level = getBracketedLevelFromName(slot.getStack()); if (!NumberUtils.isDigits(level)) return List.of(); - return List.of(SlotText.bottomLeft(Text.literal(level).formatted(Formatting.RED))); + return List.of(SlotText.bottomLeft(Text.literal(level).withColor(0xFFDDC1))); } default -> { return List.of(); diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CollectionAdder.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CollectionAdder.java index e577f0d8..207190c2 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CollectionAdder.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/CollectionAdder.java @@ -6,7 +6,6 @@ import de.hysky.skyblocker.utils.RomanNumerals; import net.minecraft.item.ItemStack; import net.minecraft.screen.slot.Slot; import net.minecraft.text.Text; -import net.minecraft.util.Formatting; import org.jetbrains.annotations.NotNull; import java.util.List; @@ -26,7 +25,7 @@ public class CollectionAdder extends SlotTextAdder { Matcher matcher = COLLECTION.matcher(stack.getName().getString()); if (matcher.matches()) { int level = RomanNumerals.romanToDecimal(matcher.group("level")); - return List.of(SlotText.bottomRight(Text.literal(String.valueOf(level)).formatted(Formatting.YELLOW))); + return List.of(SlotText.bottomRight(Text.literal(String.valueOf(level)).withColor(0xFFDDC1))); } return List.of(); } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EnchantmentLevelAdder.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EnchantmentLevelAdder.java index 9c85ae61..5530035d 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EnchantmentLevelAdder.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EnchantmentLevelAdder.java @@ -31,11 +31,11 @@ public class EnchantmentLevelAdder extends SlotTextAdder { NbtCompound enchantments = nbt.getCompound("enchantments"); if (enchantments.getSize() != 1) return List.of(); //Only makes sense to display the level when there's one enchant. int level = enchantments.getInt(enchantments.getKeys().iterator().next()); - return List.of(SlotText.bottomLeft(Text.literal(String.valueOf(level)).formatted(Formatting.GREEN))); + return List.of(SlotText.bottomLeft(Text.literal(String.valueOf(level)).withColor(0xFFDDC1))); } else { //In bazaar, the books have the enchantment level in the name int level = getEnchantLevelFromString(name); if (level == 0) return List.of(); - return List.of(SlotText.bottomLeft(Text.literal(String.valueOf(level)).formatted(Formatting.GREEN))); + return List.of(SlotText.bottomLeft(Text.literal(String.valueOf(level)).withColor(0xFFDDC1))); } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EssenceShopAdder.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EssenceShopAdder.java new file mode 100644 index 00000000..65574a5a --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/adders/EssenceShopAdder.java @@ -0,0 +1,51 @@ +package de.hysky.skyblocker.skyblock.item.slottext.adders; + +import de.hysky.skyblocker.skyblock.item.slottext.SlotText; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextAdder; +import de.hysky.skyblocker.utils.ItemUtils; +import de.hysky.skyblocker.utils.RomanNumerals; +import net.minecraft.item.ItemStack; +import net.minecraft.screen.slot.Slot; +import net.minecraft.text.Text; +import org.jetbrains.annotations.NotNull; + +import java.text.NumberFormat; +import java.util.List; +import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class EssenceShopAdder extends SlotTextAdder { + private static final Pattern ESSENCELEVEL = Pattern.compile("^[\\w ]+ (?<level>[IVXLCDM]+)$"); + private static final Pattern UNLOCKED = Pattern.compile("UNLOCKED"); + private static final Pattern ESSENCE = Pattern.compile("Your \\w+ Essence: (?<essence>[\\d,]+)"); + + public EssenceShopAdder() { + super("Essence Shop"); + } + + @Override + public @NotNull List<SlotText> getText(Slot slot) { + final ItemStack stack = slot.getStack(); + + Matcher essenceLevelMatcher = ESSENCELEVEL.matcher(stack.getName().getString()); + Matcher essenceAmountMatcher = ItemUtils.getLoreLineIfMatch(stack, ESSENCE); + + if (essenceLevelMatcher.matches()) { + int level = RomanNumerals.romanToDecimal(essenceLevelMatcher.group("level")); + Matcher unlockedMatcher = ItemUtils.getLoreLineIfMatch(stack, UNLOCKED); + if (unlockedMatcher == null) { + level -= 1; + } + return List.of(SlotText.bottomR |
