diff --git a/CHANGELOG.md b/CHANGELOG.md index a773164acb58..7b783ad7d41b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,10 +84,15 @@ #### Chat Changes + Hide new Fire Sale message format. - Thunderblade73 ++ Added Hypixel Lobby chat messages "SMP" and "Snow Particles" to the Spam Filter. - walker ++ Added more messages to Hypixel Lobby spam hider. + + SMP and Snow Particles. - walker + + Earned mystery dust. - alexia #### Misc Changes + Tia Relay Helper: Suggest /togglemusic. - alexia ++ Added option to ignore Everything Chroma in the chat. - VixidDev ### Fixes @@ -110,6 +115,7 @@ + Fixed Daily Kuudra part of Crimson Isle Reputation Helper not detecting completed runs. - hannibal2 + Fixed wrong calculation when zero bosses killed in slayer profit trackers. - hannibal2 + Hide No Fishing Bait warning during Kuudra fight. - hannibal2 ++ Fixed Dungeon and Kuudra party finder join message not detecting in party member tab complete. - CalMWolfs #### Mining Fixes @@ -132,6 +138,7 @@ + Fixed hide non-clickable items not working in some bazaar pages. - hannibal2 + Fixed rogue sword ability taking into account mage cooldown reduction. - Empa + Reset item ability cooldowns on the world switch. - hannibal2 ++ Fixed Crap Hat of Celebration not getting detected as accessory in Hide Not Clickable Items. - Empa #### Bingo Fixes @@ -146,6 +153,12 @@ #### GUI Fixes + Fixed items in SkyHanni GUI elements rendering over minecraft menus. - Thunderblade73 ++ Fixed GUI Editor hotkey working while inside a NEU PV text box. - Thunderblade73 + +#### Winter Fixes + ++ Fixed Unique Gifting Opportunities working with Golden Gift. - CalMWolfs ++ Fixed Frozen Treasure Tracker showing wrong Compact Procs number. - CalMWolfs #### Misc Fixes @@ -174,6 +187,10 @@ + Tell people how to name a pattern variable. - CalMWolfs + Typo fixes in contributing md. - CalMWolfs + Make Repo Pattern keys more consistent for Farming Gear. - CalMWolfs ++ Added options to ban specific imports in some packages. - nea ++ Don't allow uppercase Repo Pattern keys and added a more descriptive error. - CalMWolfs ++ Moved party API chat messages to Repo Pattern. - CalMWolfs ++ Allowing nullable parameters for regex functions matches() and find(). - hannibal2 ## Version 0.22 diff --git a/build.gradle.kts b/build.gradle.kts index e7f55fadd021..0b8bebb1ba1d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.23.Beta.7" +version = "0.23.Beta.8" val gitHash by lazy { val baos = ByteArrayOutputStream() diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index f2fc7f17591b..0e6a38e3aad3 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -368,7 +368,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.23.Beta.7", + version = "0.23.Beta.8", ) class SkyHanniMod { @Mod.EventHandler diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index b7901d078a39..0f1da835b649 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -7,9 +7,11 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzKeyPressEvent import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.getPropertiesWithType import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.SimpleTimeMark +import io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextField import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest @@ -33,7 +35,7 @@ class GuiEditManager { if (isInGui()) return Minecraft.getMinecraft().currentScreen?.let { - if (it !is GuiInventory && it !is GuiChest && it !is GuiEditSign && it !is GuiProfileViewer) return + if (it !is GuiInventory && it !is GuiChest && it !is GuiEditSign && !(it is GuiProfileViewer && !it.anyTextBoxFocused())) return if (it is GuiEditSign && !it.isRancherSign()) return } @@ -51,6 +53,7 @@ class GuiEditManager { } companion object { + var currentPositions = mutableMapOf() private var latestPositions = mapOf() private var currentBorderSize = mutableMapOf>() @@ -77,8 +80,8 @@ class GuiEditManager { lastHotkeyReminded = SimpleTimeMark.now() LorenzUtils.chat( "§eTo edit hidden GUI elements:\n" + - " §7- §e1. Set a key in /sh edit.\n" + - " §7- §e2. Click that key while the GUI element is visible." + " §7- §e1. Set a key in /sh edit.\n" + + " §7- §e2. Click that key while the GUI element is visible." ) } } @@ -111,6 +114,9 @@ class GuiEditManager { fun Position.getAbsX() = getAbsX0(getDummySize(true).x) fun Position.getAbsY() = getAbsY0(getDummySize(true).y) + + fun GuiProfileViewer.anyTextBoxFocused() = + this.getPropertiesWithType().any{it.focus} } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt index d7f614145862..f628c8a4be21 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt @@ -134,7 +134,7 @@ object FrozenTreasureTracker { addAsSingletonList("§6${formatNumber(data.treasuresMined)} Treasures Mined") addAsSingletonList("§3${formatNumber(estimatedIce)} Total Ice") addAsSingletonList("§3${formatNumber(icePerHour)} Ice/hr") - addAsSingletonList("§8${formatNumber(data.treasuresMined)} Compact Procs") + addAsSingletonList("§8${formatNumber(data.compactProcs)} Compact Procs") addAsSingletonList("") for (treasure in FrozenTreasure.entries) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt index db1375b75d1e..9a18572b1b52 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ShiftClickNPCSell.kt @@ -29,7 +29,7 @@ object ShiftClickNPCSell { @SubscribeEvent fun onOpen(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return - inInventory = lastLoreLineOfSellPattern.matches(event.inventoryItems[sellSlot]?.getLore()?.lastOrNull() ?: "") + inInventory = lastLoreLineOfSellPattern.matches(event.inventoryItems[sellSlot]?.getLore()?.lastOrNull()) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index 9aee4035d5fd..f5552701ea6c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -133,7 +133,7 @@ class MinionFeatures { if (!minionTitlePattern.find(event.inventoryName)) return event.inventoryItems[48]?.let { - if (minionCollectItemPattern.matches(it.name ?: "")) { + if (minionCollectItemPattern.matches(it.name)) { MinionOpenEvent(event.inventoryName, event.inventoryItems).postAndCatch() return } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index e9eb0afeacfc..8dd4da6b261f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -43,6 +43,11 @@ import kotlin.properties.ReadWriteProperty import kotlin.reflect.KMutableProperty1 import kotlin.reflect.KProperty import kotlin.reflect.KProperty0 +import kotlin.reflect.KProperty1 +import kotlin.reflect.full.isSubtypeOf +import kotlin.reflect.full.memberProperties +import kotlin.reflect.full.starProjectedType +import kotlin.reflect.jvm.isAccessible import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds @@ -508,6 +513,14 @@ object LorenzUtils { } } + inline fun Any.getPropertiesWithType() = + this::class.memberProperties + .filter { it.returnType.isSubtypeOf(T::class.starProjectedType) } + .map { + it.isAccessible = true + (it as KProperty1).get(this) + } + fun List.nextAfter(after: String, skip: Int = 1) = nextAfter({ it == after }, skip) fun List.nextAfter(after: (String) -> Boolean, skip: Int = 1): String? { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt index 7c33cd1b2f5c..b25c47aaee9a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt @@ -281,9 +281,9 @@ object StringUtils { fun String.convertToFormatted(): String = this.replace("&&", "§") - fun Pattern.matches(string: String) = matcher(string).matches() + fun Pattern.matches(string: String?) = string?.let { matcher(it).matches() } ?: false - fun Pattern.find(string: String) = matcher(string).find() + fun Pattern.find(string: String?) = string?.let { matcher(it).find() } ?: false fun String.allLettersFirstUppercase() = split("_").joinToString(" ") { it.firstLetterUppercase() }