From 34ba8c5fb8304e7b568822f8d3f675a0f133c6da Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 6 Jul 2024 07:57:22 +0200 Subject: [PATCH 01/44] Improvement: Estimated Item Value (#2180) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../misc/EstimatedItemValueConfig.java | 31 +++++++++++++++++++ .../items/EstimatedItemValueCalculator.kt | 25 +++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java index d1d3e242551e..dcbb65d15862 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; @@ -63,6 +64,36 @@ public class EstimatedItemValueConfig { @ConfigEditorBoolean public boolean ignoreRunes = false; + @Expose + @ConfigOption(name = "Bazaar Price Source", desc = "Use Instant Buy or Buy Order.") + @ConfigEditorDropdown + public BazaarPriceSource bazaarPriceSource = BazaarPriceSource.BUY_ORDER; + + public enum BazaarPriceSource { + INSTANT_BUY("Instant Buy"), + BUY_ORDER("Buy Order"), + ; + private final String str; + + BazaarPriceSource(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } + + @Expose + @ConfigOption( + name = "Use Attribute Price", + desc = "Show composite price for attributes instead of lowest bin. " + + "This will drastically decrease the estimated value but might be correct when buying multiple low tier items and combining them." + ) + @ConfigEditorBoolean + public boolean useAttributeComposite = false; + @Expose @ConfigLink(owner = EstimatedItemValueConfig.class, field = "enabled") public Position itemPriceDataPos = new Position(140, 90, false, true); diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 1d6b21d2e1cb..54f8f675eb55 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.misc.items import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.ReforgeAPI +import at.hannibal2.skyhanni.config.features.misc.EstimatedItemValueConfig import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.sortedDesc import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -17,7 +18,6 @@ import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull -import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull import at.hannibal2.skyhanni.utils.NEUItems.getRawCraftCostOrNull import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -208,7 +208,8 @@ object EstimatedItemValueCalculator { private fun String.fixMending() = if (this == "MENDING") "VITALITY" else this private fun getPriceOrCompositePriceForAttribute(attributeName: String, level: Int): Double? { - return (1..10).mapNotNull { lowerLevel -> + val intRange = if (config.useAttributeComposite) 1..10 else level..level + return intRange.mapNotNull { lowerLevel -> "$attributeName;$lowerLevel".asInternalName().getPriceOrNull() ?.let { it / (1 shl lowerLevel) * (1 shl level).toDouble() } }.minOrNull() @@ -585,9 +586,10 @@ object EstimatedItemValueCalculator { val map = mutableMapOf() //todo use repo - val tieredEnchants = listOf("compact", "cultivating", "champion", "expertise", "hecatomb") + val tieredEnchants = listOf("compact", "cultivating", "champion", "expertise", "hecatomb", "toxophilite") val onlyTierOnePrices = listOf("ultimate_chimera", "ultimate_fatal_tempo", "smoldering", "ultimate_flash", "divine_gift") + val onlyTierFivePrices = listOf("ferocious_mana", "hardened_mana", "mana_vampire", "strong_mana") val internalName = stack.getInternalName() for ((rawName, rawLevel) in enchantments) { @@ -614,6 +616,16 @@ object EstimatedItemValueCalculator { } level = 1 } + if (rawName in onlyTierFivePrices) { + when (rawLevel) { + 6 -> multiplier = 2 + 7 -> multiplier = 4 + 8 -> multiplier = 8 + 9 -> multiplier = 16 + 10 -> multiplier = 32 + } + level = 5 + } if (internalName.startsWith("ENCHANTED_BOOK_BUNDLE_")) { multiplier = EstimatedItemValue.bookBundleAmount.getOrDefault(rawName, 5) } @@ -743,4 +755,11 @@ object EstimatedItemValueCalculator { list += priceMap.sortedDesc().keys return totalPrice } + + private fun NEUInternalName.getPrice(): Double = getPriceOrNull() ?: -1.0 + + private fun NEUInternalName.getPriceOrNull(): Double? { + val useSellPrice = config.bazaarPriceSource == EstimatedItemValueConfig.BazaarPriceSource.BUY_ORDER + return getPriceOrNull(useSellPrice) + } } From 7b3ed85d171c156f895fdbaeff4d18572fc0f18e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:08:52 +0200 Subject: [PATCH 02/44] Backend: Fixed typos everywhere (#2175) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .idea/dictionaries/default_user.xml | 499 ++++++++++-------- CONTRIBUTING.md | 2 +- .../skyhannimodule/ModuleProcessor.kt | 6 +- docs/CHANGELOG.md | 110 ++-- docs/DISCORD_FAQ.md | 4 +- docs/FEATURES.md | 44 +- .../at/hannibal2/skyhanni/api/SkillAPI.kt | 4 +- .../skyhanni/config/commands/Commands.kt | 8 +- .../config/features/dev/DebugConfig.java | 3 +- .../features/event/diana/DianaConfig.java | 2 +- .../winter/GiftingOpportunitiesConfig.java | 1 + .../config/features/garden/GardenConfig.java | 2 +- .../garden/visitor/ShoppingListConfig.java | 2 +- .../inventory/helper/ReforgeHelperConfig.java | 2 +- .../config/features/misc/MiscConfig.java | 1 + .../compacttablist/CompactTabListConfig.java | 2 +- .../area/stillgorechateau/EffigiesConfig.java | 1 + .../at/hannibal2/skyhanni/data/HypixelData.kt | 6 +- .../data/bazaar/HypixelBazaarFetcher.kt | 4 +- .../at/hannibal2/skyhanni/data/model/Graph.kt | 6 +- .../skyhanni/data/model/SkyblockStat.kt | 1 + .../skyhanni/data/model/TextInput.kt | 32 +- .../hannibal2/skyhanni/data/repo/RepoUtils.kt | 8 +- ...pEvent.kt => SkillOverflowLevelUpEvent.kt} | 2 +- .../features/bingo/card/BingoCardReader.kt | 6 +- .../features/bingo/card/goals/BingoGoal.kt | 3 +- .../skyhanni/features/combat/FlareDisplay.kt | 4 +- .../combat/damageindicator/BossType.kt | 6 +- .../damageindicator/DamageIndicatorManager.kt | 2 +- .../combat/damageindicator/MobFinder.kt | 2 +- .../combat/ghostcounter/GhostCounter.kt | 4 +- .../features/commands/PartyChatCommands.kt | 2 +- .../features/dungeon/CroesusChestTracker.kt | 2 +- .../skyhanni/features/dungeon/DungeonAPI.kt | 4 +- .../features/dungeon/DungeonHideItems.kt | 2 +- .../features/event/diana/DianaFixChat.kt | 2 +- .../event/diana/GriffinBurrowHelper.kt | 4 +- .../features/event/diana/SoopyGuessBurrow.kt | 30 +- .../skyhanni/features/garden/GardenPlotAPI.kt | 4 +- .../garden/contest/JacobContestTimeNeeded.kt | 4 +- .../garden/fortuneguide/pages/CropPage.kt | 2 +- .../features/misc/FixGhostEntities.kt | 2 +- .../features/misc/PatcherSendCoordinates.kt | 6 +- .../misc/compacttablist/AdvancedPlayerList.kt | 8 +- .../misc/discordrpc/DiscordLocationKey.kt | 2 +- .../features/misc/limbo/LimboTimeTracker.kt | 16 +- .../dailyquest/QuestLoader.kt | 2 +- .../stillgorechateau/RiftBloodEffigies.kt | 2 +- .../features/skillprogress/SkillProgress.kt | 4 +- .../features/slayer/SlayerProfitTracker.kt | 2 +- .../features/slayer/SlayerRngMeterDisplay.kt | 4 +- .../slayer/enderman/EndermanSlayerFeatures.kt | 2 +- .../AccessorRendererLivingEntity.java | 2 +- .../MixinContributorRendererEntityLiving.java | 2 +- .../skyhanni/test/TestCopyBestiaryValues.kt | 4 +- .../test/hotswap/HotswapSupportImpl.kt | 2 +- .../hannibal2/skyhanni/utils/CombatUtils.kt | 4 +- .../skyhanni/utils/EntityOutlineRenderer.kt | 40 +- .../skyhanni/utils/InventoryUtils.kt | 2 +- .../at/hannibal2/skyhanni/utils/ItemUtils.kt | 2 +- .../hannibal2/skyhanni/utils/LocationUtils.kt | 6 +- .../hannibal2/skyhanni/utils/LorenzUtils.kt | 2 +- .../hannibal2/skyhanni/utils/RenderUtils.kt | 88 ++- .../utils/SkyBlockItemModifierUtils.kt | 2 +- .../skyhanni/utils/renderables/Renderable.kt | 16 +- .../utils/repopatterns/RepoPatternManager.kt | 8 +- .../hannibal2/skyhanni/utils/shader/Shader.kt | 2 +- .../skyhanni/utils/shader/ShaderHelper.kt | 12 +- .../skyhanni/utils/shader/ShaderManager.kt | 2 +- .../skyhanni/utils/tracker/ItemTrackerData.kt | 2 +- .../utils/tracker/SkyHanniItemTracker.kt | 2 +- 71 files changed, 573 insertions(+), 512 deletions(-) rename src/main/java/at/hannibal2/skyhanni/events/{SkillOverflowLevelupEvent.kt => SkillOverflowLevelUpEvent.kt} (69%) diff --git a/.idea/dictionaries/default_user.xml b/.idea/dictionaries/default_user.xml index 3de37f4054d4..64c012a13789 100644 --- a/.idea/dictionaries/default_user.xml +++ b/.idea/dictionaries/default_user.xml @@ -1,225 +1,276 @@ - - - abiphone - agaricus - allinvite - apec - arachne - arachne's - ashfang - autopet - bacte - bandana - berberis - biome - bladesoul - blobbercysts - bloodfiend - bobber - bobber's - bonzo - bonzo's - bonzos - boop - bossbar - broodfather - broodmother - cadycous - carrolyn - cata - cavespider - chestplate - chocolatefactory - chronomatron - chumcap - citrine - coflnet - coords - craftable - cropie - crosshair - deathmite - deathmites - deathripper - demonlord - derpy - despawn - dicer - disintegrator - disintegrators - dragontail - dreadfarm - dreadlord - dungeoneering - dwarven - egglocator - einary - einary's - elitebot - enderman - endermen - endermite - enderstone - endstone - etherwarp - explosivity - fermento - firedust - firesale - firesales - getfromsacks - glacite - glowstone - goldor - gratitudes - hardstone - hatcessory - hecatomb - hideparticles - hoppity - hoppity's - horsezooka - hotbar - hotm - hoverable - hpb's - hypixel - hypixel's - ichor - igrupan - igrupan's - ingame - inquis - inquistiors - internalname - interp - itemstack - jawbus - jerries - jerrypocalypse - jyrre - kaeso - keybind - keybinds - kindlebane - kismets - kloon - kuudra - kuudra's - laggy - lapis - larvas - lclick - lerp - livids - matriach - mawdredge - maxor - mcmod - millenia - miniboss - mirrorverse - mmclick - mobtracker - modid - moldfin - mooshroom - moul - moulberry - moulconfig - mouselocked - mouselowered - mycelium - nametag - nametags - necron - netherrack - neu's - npcs - nukekebi - nukekubi - odger - odger's - odonata - odonatas - opengenerowmenu - opti - oruo - packmaster - peridot - perkpocalypse - pickblock - pickobulus - pickonimbus - plhlegblast - polarvoid - preinitialization - procs - punchcard - pyrochaos - quazii - rclick - recombobulated - recombobulator - redstone - reindrake - renderable - renderables - revenant - riftstalker - robotron - runecrafting - sadan - scatha - sethome - shcopytranslation - shcropstartlocation - shlanedetection - shmarkplayer - shmouselock - shoutout - shulker - shwords - shworldedit - skeletor - skyblock - skyhanni - skyhanni's - skymall - skytils - skytils's - soopy - soopy's - soulsand - soulweaver - sprayonator - stillgore - stonk - superboom - supercraft - supercrafting - superlite - superpairs - tablist - terracottas - thaumaturgy - treasurite - tubulator - turbomax - twinclaws - typhoeus - ultrasequencer - unobtained - untrackable - vermins - viewrecipe - voidgloom - voidling - voltas - wikithis - wyld - yoggie - - - + + + aatrox + abiphone + agaricus + allinvite + apec + arachne + arachne's + armorstand + armorstands + ashfang + astraea + attunement + autopet + azrael + bacte + bandana + berberis + bezal + biblio + biome + bladesoul + blobbercyst + blobbercysts + bloodfiend + bobber + bobber's + bonzo + bonzo's + bonzos + boop + bossbar + branchstrutter + broodfather + broodmother + burningsoul + caducous + cadycous + carrolyn + cata + cavespider + chestplate + chocolatefactory + chronomatron + chumcap + cinderbat + citrine + coflnet + coords + craftable + crit + cropie + crosshair + deathmite + deathmites + deathripper + deepterror + demonlord + derpy + despawn + dicer + disintegrator + disintegrators + dragontail + dreadfarm + dreadlord + dungeoneering + dwarven + egglocator + einary + einary's + elitebot + enderman + endermen + endermite + enderstone + endstone + etherwarp + explosivity + ezpz + fairylosopher + fermento + firedust + firesale + firesales + framebuffer + getfromsacks + ghast + glacite + glowstone + goldor + golem + gratitudes + hardstone + hatcessory + hecatomb + hexatorum + hideparticles + hoppity + hoppity's + horsezooka + hotbar + hotm + hoverable + hpb's + hypixel + hypixel's + ichor + igrupan + igrupan's + ingame + inquis + inquistiors + insanium + internalname + interp + itemstack + jawbus + jerries + jerrypocalypse + jyrre + kada + kaeso + keybind + keybinds + kindlebane + kismets + kloon + kuudra + kuudra's + laggy + lapis + larvas + lclick + lerp + livids + locraw + magmafish + matriach + mawdredge + maxor + mcmod + millenia + minecart + mineman + miniboss + mirrorverse + misclick + missclick + mmclick + mobtracker + modid + modrinth + moldfin + mooshroom + moul + moulberry + moulconfig + mouselocked + mouselowered + mycelium + nametag + nametags + necron + netherrack + neu's + npcs + nukekebi + nukekubi + odger + odger's + odonata + odonatas + opengenerowmenu + opti + oruo + otherside + overworld + packmaster + peridot + perkpocalypse + pesterminator + pickblock + pickobulus + pickonimbus + pitchin + plhlegblast + pling + pocalypse + polarvoid + preinitialization + procs + prospection + pumpgrotto + punchcard + pyrochaos + quazii + ragnarock + rclick + recombobulated + recombobulator + redstone + reindrake + renderable + renderables + revenant + riftstalker + rngesus + robotron + runecrafting + sadan + scarleton + scatha + sepulture + seraphine + sethome + shcopytranslation + shcropstartlocation + shlanedetection + shmarkplayer + shmouselock + shoutout + shulker + shwords + shworldedit + skeletor + skyblock + skyhanni + skyhanni's + skymall + skytils + skytils's + slimehill + soopy + soopy's + soulbound + soulflow + soulsand + soulweaver + sprayonator + statspocalypse + stillgore + stonk + superboom + supercraft + supercrafting + superlite + superpairs + tablist + terracottas + thaumaturgist + thaumaturgy + townsquare + treasurite + tubulator + turbomax + twinclaws + typhoeus + ultrasequencer + unobtained + untrackable + vermins + viewrecipe + voidgloom + voidling + voltas + weaponsmith + wikithis + wyld + yoggie + yolkar + + + \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b622b4a6db93..3194902b8403 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,7 +145,7 @@ The repo is located at https://github.com/hannibal002/SkyHanni-REPO. A copy of all json files is stored on the computer under `.minecraft\config\skyhanni\repo`. On every game start, the copy gets updated (if outdated and if not manually disabled). If you add stuff to the repo make sure it gets serialised. See -the [jsonobjects](src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo) +the [JsonObjects](src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo) folder for how to properly do this. You also may have to disable repo auto update in game. ### Discord IPC diff --git a/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt b/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt index 99d7904d0b33..5ce90261351b 100644 --- a/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt +++ b/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/ModuleProcessor.kt @@ -90,10 +90,10 @@ class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logg error("${warnings.size} errors related to event annotations found, please fix them before continuing. Click on the kspKotlin build log for more information.") } - val dependencies = symbols.mapNotNull { it.containingFile }.toTypedArray() - val deps = Dependencies(true, *dependencies) + val sources = symbols.mapNotNull { it.containingFile }.toTypedArray() + val dependencies = Dependencies(true, *sources) - val file = codeGenerator.createNewFile(deps, "at.hannibal2.skyhanni.skyhannimodule", "LoadedModules") + val file = codeGenerator.createNewFile(dependencies, "at.hannibal2.skyhanni.skyhannimodule", "LoadedModules") OutputStreamWriter(file).use { it.write("package at.hannibal2.skyhanni.skyhannimodule\n\n") diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b9b4c19b0327..22be128be8c9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -12,7 +12,7 @@ + Show effective area (as a wireframe, filled or circle). + Show mana regeneration buff next to the GUI element. + Option to hide flare particles. -+ Added a "Line to Arachne" setting, just like with slayer minibosses. - ++ Added a "Line to Arachne" setting, just like with slayer mini bosses. - azurejelly (https://github.com/hannibal002/SkyHanni/pull/1888) + Added In-Water Display. - Stella (https://github.com/hannibal002/SkyHanni/pull/1892) + Useful when using a Prismarine Blade in Stranded Mode. @@ -256,7 +256,7 @@ Empa (https://github.com/hannibal002/SkyHanni/pull/1875) + Updated /shclearminiondata to remove only bugged minions nearby, not all minions. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1951) -+ Added information about the current Perkopocalypse Mayor's perks to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2003) ++ Added information about the current Perkpocalypse Mayor's perks to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2003) + Added support for Fancy Contributors in nametags. - Empa (https://github.com/hannibal002/SkyHanni/pull/1687) + Improved overall performance slightly by about ~1%. - nea (https://github.com/hannibal002/SkyHanni/pull/2033) + Improved Hypixel server detection. - Luna (https://github.com/hannibal002/SkyHanni/pull/2064) @@ -337,7 +337,7 @@ + Fixed showing "No Magical Power detected" message multiple times. - Empa (https://github.com/hannibal002/SkyHanni/pull/2065) + Fixed unknown lines not appearing instantly in the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2063) + Fixed Anniversary Line not being detected in Custom Scoreboard. - Empa, j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2058) -+ Fixed Perkapocalypse Mayor's time being longer than Jerry's time in office. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2045) ++ Fixed Perkpocalypse Mayor's time being longer than Jerry's time in office. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2045) + Fixed Unknown lines in the Custom Scoreboard. - Empa (https://github.com/hannibal002/SkyHanni/pull/2119) + Fixed broken event start time for upcoming events in the Custom Scoreboard. - Luna (https://github.com/hannibal002/SkyHanni/pull/2113) + Fixed the New Year Event missing in the Custom Scoreboard.. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2122) @@ -449,7 +449,7 @@ + Reserves a key namespace, that is only accessible from this group. + Increased usage of seconds passed. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1899) + Refactored /ff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/873) -+ Added Perkopocalypse Mayor to MayorAPI. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2003) ++ Added Perkpocalypse Mayor to MayorAPI. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2003) + Created FmlEventApi to hold Forge events before dispatching them as SkyHanniEvents. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1986) + Ensured correct config version when downgrading the mod. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1990) + Changed CachedItemData to use SimpleTimeMark. - nea (https://github.com/hannibal002/SkyHanni/pull/2006) @@ -500,7 +500,7 @@ + This is separate from chroma. + This is achieved by using §#§0§0§0§f§f§f§/. + Simply use the ExtendedChatColor class. -+ Refactored Area Miniboss Features to use mob detection. - Empa (https://github.com/hannibal002/SkyHanni/pull/2095) ++ Refactored Area Mini boss Features to use mob detection. - Empa (https://github.com/hannibal002/SkyHanni/pull/2095) + Added OreBlock and OreType. - Empa (https://github.com/hannibal002/SkyHanni/pull/1655) + Added OreMinedEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/1655) + Provides information on the original block mined, and any other blocks mined by sources like Efficient Miner, Mole, etc. @@ -508,7 +508,7 @@ + Fixed HotmAPI saving incorrect level values when using Blue Egg. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2097) + Fixed the interest widget and added a scrap widget. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2094) + Made SkyHanni into a Mod. - hannibal2 + nea (https://github.com/hannibal002/SkyHanni/pull/2099) -+ Fixed illegal mob detection with ridable pets. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2010) ++ Fixed illegal mob detection with rideable pets. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2010) + Removed yet another deprecated function. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2021) + Created and implemented PlayerDeathEvent. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1544) + Added a list of named nodes for the graph editor. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2059) @@ -661,7 +661,7 @@ + Added Factory Chat Filters. - RobotHanzo (https://github.com/hannibal002/SkyHanni/pull/1574) + Hide chocolate factory upgrade and employee promotion messages. + Copy Chocolate Factory Stats to clipboard. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) -+ Highlight unbought items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) ++ Highlight non-purchased items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) + Added time tower status to the chocolate factory stats. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1506) + Also can notify you when you get a new charge or your charges are full. @@ -702,7 +702,7 @@ + Highlights the Heavy Pearls. + Draws a line to the Heavy Pearls. -#### Slayer Featues +#### Slayer Features + Added Blaze Slayer fire pillar display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1766) + Shows a large display with a timer when the Fire Pillar is about to explode. @@ -838,7 +838,7 @@ #### Commands Improvements -+ Add /trade to tab completeable commands. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1354) ++ Add /trade to tab completable commands. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1354) + Improved gfs to have support for calculations in amount. - Conutik (https://github.com/hannibal002/SkyHanni/pull/1493) + Cleanup the format for the /shcommand hover description. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1531) @@ -926,7 +926,7 @@ + Improved various Hoppity features. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) + Show an estimation of when you will prestige based on your chocolate/second. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1514) -+ Removed the Hoppity Menu Shortcut in The Rift, Kuudra, Catacombs and Mineshafts. - ++ Removed the Hoppity Menu Shortcut in Rift, Kuudra, Catacombs and Mineshaft. - raven (https://github.com/hannibal002/SkyHanni/pull/1585) + You cannot use the chocolate factory in these areas, resulting in the button being removed. + Live update chocolate amounts in other inventories related to the chocolate factory. - @@ -1241,7 +1241,7 @@ #### Rift Fixes -+ Fixed Rift NPC shops being treated as overworld ones for selling items to them. - ++ Fixed Rift NPC shops being treated as Overworld ones for selling items to them. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1494) + Fixed Blood Effigies timers in the Rift. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1649) + Fixed timers showing even when above the set respawn time. @@ -1289,7 +1289,7 @@ #### Crimson Isle Fixes -+ Fixed incorrect miniboss amount displayed by Crimson Isle Reputation Helper. - ++ Fixed incorrect mini boss amount displayed by Crimson Isle Reputation Helper. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1633) + Fixed Volcano Explosivity Display. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1821) + Broken when Hypixel introduced the new tab list. @@ -1344,7 +1344,7 @@ + Fixed updater downloading the wrong version. - Empa (https://github.com/hannibal002/SkyHanni/pull/1590) + Fixed some mob features not working with Skytils' ping display. - Thunderblade73 & martimavocado (https://github.com/hannibal002/SkyHanni/pull/1605) -+ Fixed overly frequent bazaar price error messages. - hannnibal2 (https://github.com/hannibal002/SkyHanni/pull/1597) ++ Fixed overly frequent bazaar price error messages. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1597) + Fixed overly long description for Patcher send coordinates waypoints. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1631) + Fixed the low quiver warning. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1629) @@ -1354,7 +1354,7 @@ Luna (https://github.com/hannibal002/SkyHanni/pull/1706) + Fixed bugged minion name tags on your private island when opening a minion. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1630) -+ Fixed supercrafted items being incorrectly added to profit trackers. - ++ Fixed super-crafted items being incorrectly added to profit trackers. - Empa (https://github.com/hannibal002/SkyHanni/pull/1784) + Fixed typo in the Mythological Creature Tracker reset command. - Jordyrat (https://github.com/hannibal002/SkyHanni/pull/1800) @@ -1383,7 +1383,7 @@ + Added offset to tick event. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1342) + Made dungeon milestone use repo instead of local patterns. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1342) -+ Unprivate LorenzVec.toCleanString. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1344) ++ Removed private modifier from LorenzVec.toCleanString. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1344) + Removed Old TimeMark Class. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1322) + Remove a lot of usage of fixed rate timers and replace with a new event. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1264) @@ -1414,7 +1414,7 @@ + Added Renderable.verticalContainer. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1318) + Remove a lot of deprecated methods. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1371) + Added Renderable.table. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/822) -+ Add API for rendering fake ghostly/holograhpic entities in the world. - ++ Add API for rendering fake ghostly/holographic entities in the world. - nea (https://github.com/hannibal002/SkyHanni/pull/731) + Added a `removeSpray` method to `Plot`. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1178) + Changed stuff around with chat messages. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1227) @@ -1454,7 +1454,7 @@ + Removed use of notenoughupdates.util.Constants. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1191) + Made a generic gson builder containing common type adapters. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1308) - + Moved specific gson types (Elite api data and Hypixel api data) to their own gsons. + + Moved specific gson types (Elite api data and Hypixel api data) to their own Gson objects. + Elitebot api now uses CropType and PestType instead of strings. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1308) + Added Renderable.multiClickable. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1407) @@ -1609,7 +1609,7 @@ + Highlights your selected class in green if it's available. + Kismet tracking for dungeon chests. - Thunderblade73 + Highlight chests which have been rerolled inside Croesus - + Shows kismet amount at the reroll button + + Shows kismet amount at the re-roll button #### Garden Features @@ -1724,7 +1724,7 @@ j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1221) + Using a draggable list, you can fully customise, what events will be shown which what priority. + Updated default Scoreboard Elements config option. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1221) -+ Added feature to showcase foxy's extra in Custom Scoreboard. - ++ Added feature to showcase Foxy' extra event in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1270) ##### Garden Improvements @@ -1767,7 +1767,7 @@ Empa (https://github.com/hannibal002/SkyHanni/pull/1284) + Immediately hide waypoints when there are no pests left. - Empa (https://github.com/hannibal002/SkyHanni/pull/1284) -#### Crimson Improvelemts +#### Crimson Improvements + Show Town Board waypoint when there is an accepted Rescue Mission quest. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1157) @@ -1848,7 +1848,7 @@ martimavocado (https://github.com/hannibal002/SkyHanni/pull/1211) + Fix a typo in Not Clickable Items in the /equipment menu. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1242) -+ Fixed `/playtimedetailed`'s Limbo displaying incorrectly for x.0 playtimes. - ++ Fixed `/playtimedetailed`'s Limbo displaying incorrectly for x.0 play times. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1252) #### Chat Fixes @@ -1920,7 +1920,7 @@ #### Slayer Fixes -+ Added Burningsoul Demon (75M HP miniboss) to line to miniboss and highlight slayer minibosses. - ++ Added Burningsoul Demon (75M HP mini boss) to line to mini boss and highlight slayer mini bosses. - Empa (https://github.com/hannibal002/SkyHanni/pull/1144) + Fixed Damage Indicator not hiding vanilla names. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1179) + Fixed Slayer Profit Tracker not detecting the slayer spawn cost when taking money from the bank. - @@ -2014,7 +2014,7 @@ hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1195) + Remove the removed stack size option from config. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1274) -#### Fishign Fixes +#### Fishing Fixes + Renamed "fishing contest" to "fishing festival". - Empa (https://github.com/hannibal002/SkyHanni/pull/1222) + Fixed duplicate chat prefix when updating trophy fishing data from NEU PV. - @@ -2152,7 +2152,7 @@ CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1226) + Refactored visitor handling code slightly. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1224) + Removed unneeded inSacks property. -+ Added "unknownAmmount" to PestSpawnEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/1237) ++ Added "unknownAmount" to PestSpawnEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/1237) + Added StringUtils.generateRandomId(). - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1128) + Added ChatUtils.clickableChat support for runnable action. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1128) @@ -2516,7 +2516,7 @@ + Fixed no bait warning appearing at the wrong moment or not appearing at all. - hannibal2 + Fixed Crimson Isle Fishing Geyser Box showing even when very far away. - Obsidian -#### Invenory Fixes +#### Inventory Fixes + Fixed hide non-clickable items not working in some bazaar pages. - hannibal2 + Fixed rogue sword ability taking into account mage cooldown reduction. - Empa @@ -2555,7 +2555,7 @@ + Fixed GUI positions moving into the bottom-right corner when leaving the GUI position editor while pressing the mouse button on next reopen. - hannibal2 + Fixed parts of Compact Tab List being uncoloured. - CalMWolfs -+ Fixed Compact Tab List' Toggle Tab not working when using patcher. - hannibal2 ++ Fixed Compact Tab List' Toggle Tab not working when using Patcher. - hannibal2 + Fixed Skill progress display size too small when not using the progress bar. - Thunderblade73 + Fixed the skill progress bar trying to get out of the screen. - HiZe + Fixed the negative time remaining in the skill ETA display. - HiZe @@ -2651,7 +2651,7 @@ + Added the SkyHanni icon to the IntelliJ profile view. - Erymanthus + Fixed key name in utils patterns. - CalMWolfs + Using NEUInternalName in the Reputation Helper Quest. - CalMWolfs -+ Limit RAM to 4 GB in the developement enviroment. - CalMWolfs ++ Limit RAM to 4 GB in the development environment. - CalMWolfs + This is just the default and can be changed if needed. + Made /shupdaterepo better. - CalMWolfs + Added alignment support to Renderable. - Thunderblade73 @@ -2777,7 +2777,7 @@ #### Diana Features + Added Diana Profit Tracker. - hannibal2 - + Same options as slayer and fising trackers. + + Same options as slayer and fishing trackers. + Added highlight for the Minos Inquisitors to make them easier to see. - Cad + Added Mythological Mob Tracker. - hannibal2 + Counts the different mythological mobs you have dug up. @@ -2809,7 +2809,7 @@ #### Stranded Features -+ Highlights NPCs in the stranded menu that are placeable but havent been placed. - walker ++ Highlights NPCs in the stranded menu that are placeable but haven't been placed. - walker #### Rift Features @@ -3056,7 +3056,7 @@ + Created Matcher.groupOrNull. - walker + cleanPlayerName respects playerRankHider option now. - hannibal2 + Replaced ItemWarnEntry with VisitorReward. This should fix some errors. - hannibal2 -+ GardenNextJacobContest now uses SimpleTimeMark. SimpleTimeMark is storable in the config and comparable - hannibal2 ++ GardenNextJacobContest now uses SimpleTimeMark. SimpleTimeMark can now be saved in the config directly and compared - hannibal2 + No longer sending contest data to elite close to new year. - hannibal2 + Added RepoPatterns. - nea + Use LorenzToolTipEvent over ItemTooltipEvent if possible. - hannibal2 @@ -3174,7 +3174,7 @@ + Fixed opening the Pet menu no longer updating the current pet display. - hannibal2 + Fixed Archfiend Dice and High Class Archfiend Dice counting as slayer drops when rolled. - hannibal2 + Fixed dice roll profit counting as Mob Kill Coins in Slayer Tracker. - hannibal2 -+ Fixed Sack Display sometimes not formatting a million correctly. - Hize ++ Fixed Sack Display sometimes not formatting a million correctly. - HiZe + Fixed Estimated Item Value getting shown in stats breakdown menu. - hannibal2 + Fixed a bug with the ender chest and SkyHanni GUI editor. - hannibal2 + Fixed crimson isle faction icon in tab list showing twice and not going away fully when enabling the "hide faction" @@ -3190,7 +3190,7 @@ + Add log clearing. - CalMWolfs + Add auto-prefix to chat message methods. - walker + Added support for extra data in error manager. - hannibal2 -+ Added /readcropmilestonefromclipboard. - hannibal2 ++ Added /shreadcropmilestonefromclipboard. - hannibal2 + This command reads the clipboard content, in the format of users sending crop milestone step data. + The new data gets compared to the currently saved data, differences are getting replaced and the result gets put into the clipboard. The clipboard context can be used to update the repo content. @@ -3220,7 +3220,7 @@ + Added **Compact Tab List**. + Compacts the tablist to make it look much nicer (old SBA feature, but fewer bugs). - CalMWolfs - + Option to hide Hypixel advertisment banners. - CalMWolfs + + Option to hide Hypixel advertisement banners. - CalMWolfs + Added **Advanced Player List**. - hannibal2 + Customize the player list (inside the tab list) in various ways. + Change the sort order of players: Default, SkyBlock Level, alphabetical name, Iron Man first/bingo level, @@ -3242,7 +3242,7 @@ + Added Highlight Party Members. - Cad + Marking party members with a bright outline to better find them in the world. -+ Porting SBA's **chroma** into SkyHanni with many more options and chroma everything. - VixidDev ++ Porting SkyBlockAddon's **chroma** into SkyHanni with many more options and chroma everything. - VixidDev + Options to change speed, size, saturation and direction. + Added Modify Visual Words (command /shwords). - CalMWolfs + Allows you to replace text on your screen with different text (like the SBE one, just less costly). @@ -3300,11 +3300,11 @@ + Thanks Tobbbb for the coordinates! + Support for hiding basket waypoints once you have clicked on them. - hannibal2 + Option to show only the closest basket. - hannibal2 -+ Help with the 2023 Halloween visitor challenge (ephemeral dingsibumsi or something) - nea ++ Help with the 2023 Halloween visitor challenge (Ephemeral Gratitude) - nea + New Visitor Ping: Pings you when you are less than 10 seconds away from getting a new visitor. + Accept Hotkey: Accept a visitor when you press this keybind while in the visitor GUI. + Added support for showing the Primal Fear data from tab list as GUI elements. - Erymanthus -+ Play warning sound when the next Primal Fear can spawn. - thunderblade73 ++ Play warning sound when the next Primal Fear can spawn. - Thunderblade73 #### Commands @@ -3365,7 +3365,7 @@ + Only items with recipes are tab completed. + Added option to set the size of highlighted motes orbs in rift and make them smaller by default. - cimbraien + Disabled clicks on SkyHanni GUIs while inside NEU's or Skytils profile viewer. - hannibal2 -+ Removed armor stand checks for Trevor Solver. This fixes or nerfs the feature to not highlight mobs behind blocks ++ Removed armor stand checks for Trevor Solver. This fixes or de-buffs the feature to not highlight mobs behind blocks sometimes. - hannibal2 + Added diamond and gold essence support to PowderTracker. - walker + Change the fandom wiki search engine (under the /wiki command) from Google to the fandom wiki's built-in search @@ -3611,7 +3611,7 @@ + Change the color, width, and duration of the line. + Show alert when reaching max super-pairs clicks. - pretz + Plays a beep sound and sends a message in chat when the player reaches the maximum number of clicks gained for - super-pairs minigames. + super-pair mini games. + Added gemstone slot unlock costs to the Estimated Item Value. - Fix3dll + **Powder Grinding Tracker** - HiZe + Shows the Mithril/Gemstone Powder gained, the number of chests opened, if Double Powder is active, and the items @@ -3668,7 +3668,7 @@ + Adds **Double Hook** to the **sea creature chat message** instead of in a previous line. - appable0 + Rune display now shows always in sack display. + Shark fish counter now counts twice for Double hook. - appable0 -+ Ghost counter check for Mist now ignores y coordiantes - HiZe ++ Ghost counter check for Mist now ignores y coordinates - HiZe + Telling the user about the bypass hotkey when the visitor drop warning blocks a visitor refusal. - CalMWolfs + Added warning sound when the worm fishing cap of 60 is hit. - CarsCupcake + Shared inquisitor waypoints will now get removed after 75 seconds. - hannibal2 @@ -3805,7 +3805,7 @@ + Fixed maxed pet exp progress bar is wrong for bingo pet. - hannibal2 + Hopefully fixed bug that opening a visitor too quickly causes detection problems. - hannibal2 + Added nametags for minions as soon as they are placed. - Cad -+ Fixed wrong display offset in Powder Tracker. - Hize ++ Fixed wrong display offset in Powder Tracker. - HiZe + Fixed some features not working correctly because of broken location detection for wrong Hypixel area names. - Cad + This includes: + Wilted Berberis Helper (in the Rift, Dreadfarm) @@ -3829,7 +3829,7 @@ + This should also fix problems with false positive detections in the crimson isle. + Fixed item rarity problems. - hannibal2 + Fixed a rare error when opening minion inventory. - hannibal2 -+ Fixed stuff in the **Trozen Treasure Tracker**. - CalMWolfs ++ Fixed stuff in the **Frozen Treasure Tracker**. - CalMWolfs + The ice/hour calculation + Rate Timer + Typos @@ -3840,12 +3840,12 @@ + Added workaround for new fire sale cosmetics (pet skin, helmet skin, rune) in estimated item value. - hannibal2 + Fixed garden visitors not highlighting on status "new". - hannibal2 + Fixed wrongly highlighting enchanted sacks for reputation helper fetch quests. - hannibal2 -+ Fixed Fragged Spirit Mask not showing a cooldown after being triggered. - Cad ++ Fixed Fragmented Spirit Mask not showing a cooldown after being triggered. - Cad + Fixed item rarity problems with very special. - hannibal2 + Fixed party member detection issues for the tab complete feature. - CalMWolfs + Hide item rarity error message in /ff. - hannibal2 + Fixed an issue with the Wheat Profit Display not showing the correct value when combined with seeds. - Thunderblade73 -+ Tab complte party members now also detects if the party leader leaves. - CalMWolfs ++ Tab complete party members now also detects if the party leader leaves. - CalMWolfs + Fixed typos in many config settings. - Absterge + Fixed NEU Heavy Pearl detection. - hannibal2 + Fixed showing Wrong Slayer Warning sometimes at the wrong time. - Cad @@ -3906,7 +3906,7 @@ + Added existing slayer feature support for **Vampire Slayer** - HiZe + This contains RNG Meter, Slayer quest warning and Items on ground + Added item ability cooldown support for **Weirder Tuba** and **Holy Ice** - HiZe -+ Added **Lazer Parkour** Solver - CalMWolfs ++ Added **Laser Parkour** Solver - CalMWolfs + Highlights the location of the invisible blocks in the Mirrorverse + Added Mirrorverse **Dance Room Helper** - HiZe + Helps to solve the dance room in the Mirrorverse by showing multiple tasks at once. @@ -3929,7 +3929,7 @@ + **Living Metal Suit** Progress - HiZe + Display progress Living Metal Suit (Default disabled) + Option to show a compacted version of the overlay when the set is maxed -+ Added Highlight for Blobbercysts in Bacte fight in colloseum in rift - HiZe ++ Added Highlight for Blobbercysts in Bacte fight in colosseum in rift - HiZe + Show a line between **Defense blocks** and the mob and highlight the blocks - hannibal2 + Hide particles around Defense Blocks + Show a moving animation between **Living Metal** and the next block - hannibal2 @@ -3979,7 +3979,7 @@ + Added Highlight enderman slayer Nukekubi (Skulls) - dragon99z + Added option to hide the vanilla particles around enderman + Hide particles around enderman slayer bosses and mini bosses -+ Added support for Shadow Fury abilty cooldown - HiZe ++ Added support for Shadow Fury ability cooldown - HiZe + Added /sendcoords sending, detecting and rendering - dragon99z + Added **Boss Spawn Warning** - HiZe + hannibal2 + Send a title when your slayer boss is about to spawn @@ -4048,11 +4048,11 @@ + Server restart timer no longer shows all the time if over 2 minutes + Fixed crazy rare drops not counting properly - ReyMaratov + Fixed individual attribute prices in estimated item value - nea -+ Fixed sack display detection - hize -+ Fixed rare Ghost Counter bugs - hize ++ Fixed sack display detection - HiZe ++ Fixed rare Ghost Counter bugs - HiZe + Fixed a bug that farming weight display does not show up if you only have one profile + Fixed broken thorn damage indicator detection in dungeon F4/M4 -+ Fixed togglesneak mod breaking escape menu open detection for quick mod menu switch ++ Fixed "toggle sneak mod" breaking escape menu open detection for quick mod menu switch + Fixed error with detecting hit phase during eman slayer in damage indicator + No longer double counting mob kill coins in slayer item profit tracker + Fixed jacob contest time chat message chat shows one second too long @@ -4157,7 +4157,7 @@ + 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 + + Shows kill combo, coins per scavenger, all item drops, bestiary, magic find and more + Each display line is highly customizable ### Changes @@ -4389,7 +4389,7 @@ + Added Bingo Card display. + **Minion Craft Helper** - Show how many more items you need to upgrade the minion in your inventory. Especially useful for bingo. -+ Hide dead entities - Similar to Skytil's feature for inside dungeon, but for everywhere. ++ Hide dead entities - Similar to Skytils' feature for inside dungeon, but for everywhere. + Hide Fireball particles and hide Fire Block particles. + Made **blaze slayer clear view** work with more particles. + Added colors for the missing slayer area bosses (Golden Ghoul, Old Wolf and Spider Keeper) @@ -4658,7 +4658,7 @@ - Added highlight the voidling extremist in pink color - Added highlight corrupted mobs in purple color - Added command /shmarkplayer (marking a player with yellow color) -- Added highlight slayer miniboss in blue color +- Added highlight slayer mini boss in blue color - Added option to hide the death messages of other players, except for players who are close to the player, inside dungeon or during a Kuudra fight. - Added highlight the enderman slayer Yang Glyph (Beacon) in red color (supports beacon in hand and beacon flying) @@ -4674,7 +4674,7 @@ - Added /wiki command (using hypixel-skyblock.fandom.com instead of Hypixel wiki) - Added hiding damage splashes while inside the boss room (replacing a broken feature from Skytils) - Added Summoning Mob Display (Show the health of your spawned summoning mobs listed in an extra GUI element and hiding - the corresponding spawning/despawning chat messages) + the corresponding spawning/de-spawning chat messages) - Added option to hide the nametag of your spawned summoning mobs - Added option to mark the own summoning mobs in green - Added Ashfang Blazing Souls display @@ -4768,8 +4768,8 @@ ## Version 0.1 - Added damage indicator for some bosses who are outside dungeon (4 nether bosses: Ashfang, barbarian duke, mage outlaw - and Bladesoul, slayers: Enderman 1-4, revenant 5, and untested support for vanquisher in nether, Enderdragon and - Endstone protector in end) + and Bladesoul, slayers: Enderman 1-4, revenant 5, and untested support for Vanquisher in Crimson Isle, Ender Dragon and + Endstone Protector in end) - Added item ability cooldown background display (over the slot, work in progress) - Added Ashfang freeze cooldown (when you get hit by “anti ability” and slowness effect) - Changed “hot clickable items” to show items again, but only with dark gray overlay. Looks nicer diff --git a/docs/DISCORD_FAQ.md b/docs/DISCORD_FAQ.md index 8a4f9714ad6d..9edc758672ce 100644 --- a/docs/DISCORD_FAQ.md +++ b/docs/DISCORD_FAQ.md @@ -24,8 +24,8 @@ _Frequently Asked Questions_ > **7: My Jacob Contest Display crops are wrong, how do I fix this?** > Run the command `/shclearcontestdata` to clear the Jacob contest data. -> **8: How can I get bigger crop hitboxes?** -> Use Patcher or PolyPatcher to have 1.12 hitboxes in 1.8.9. +> **8: How can I get bigger crop hit boxes?** +> Use Patcher or PolyPatcher to have 1.12 hit boxes in 1.8.9. > - [Sk1erLLC's Patcher]() > - [Polyfrost's PolyPatcher]() (a fork of Patcher with OneConfig, slightly different features, and bug fixes) diff --git a/docs/FEATURES.md b/docs/FEATURES.md index 4aded1014236..d26e272a43e3 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -100,7 +100,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Highlights your selected class in green if it's available. + Kismet tracking for dungeon chests. - Thunderblade73 + Highlight chests which have been rerolled inside Croesus - + Shows kismet amount at the reroll button + + Shows kismet amount at the re-roll button + SA Jump Notification. - CarsCupcake (https://github.com/hannibal002/SkyHanni/pull/852) + Warn shorty before a Shadow Assassin jumps to you in dungeons. + Notifications for architect on puzzle fail. - Conutik (https://github.com/hannibal002/SkyHanni/pull/1197) @@ -244,7 +244,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. - Option to hide the nametag of your spawned summoning mobs. - Option to mark the own summoning mobs in green. - Summoning Mob Display (Show the health of your spawned summoning mobs listed in an extra GUI element and hiding the - corresponding spawning/despawning chat messages) + corresponding spawning/de-spawning chat messages)
@@ -322,7 +322,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Works in crystal hollows too (worm fishing) + Keybind to manually reset the barn/worm fishing timer. - CarsCupcake + Warning sound when the worm fishing cap of 60 is hit. - CarsCupcake - + Has support for the gamemode Stranded. - hannibal2 + + Has support for the game mode Stranded. - hannibal2 + **Shark Fish Counter** - Counts how many sharks have been caught. + **Odger waypoint** - Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand. + Showing fished item names @@ -457,10 +457,10 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + **Griffin Pet Warning** + Warn when holding an Ancestral Spade while no Griffin pet is selected. + **Inquisitor Sharing** - + Share aypoints for inquisitors you find with your party. + + Share waypoints for inquisitors you find with your party. + Show a timer until the inquisitor will despawn. + Diana Profit Tracker. - hannibal2 - + Same options as slayer and fising trackers. + + Same options as slayer and fishing trackers. + Highlight for the Minos Inquisitors to make them easier to see. - Cad + Mythological Mob Tracker. - hannibal2 + Counts the different mythological mobs you have dug up. @@ -520,7 +520,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Highlight corrupted mobs. + **Arachne Minis Hider** - Hides the nametag above arachne minis. + **Arachne Boss Highlighter** - Highlight the arachne boss in red and mini bosses and orange. -+ "Line to Arachne" setting, just like with slayer minibosses. - azurejelly (https://github.com/hannibal002/SkyHanni/pull/1888) ++ "Line to Arachne" setting, just like with slayer mini bosses. - azurejelly (https://github.com/hannibal002/SkyHanni/pull/1888) + Countdown for Arachne spawn. - Cad + Supports quick spawns. + Option to hide the vanilla particles around enderman @@ -557,7 +557,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + **Garden Level Display** - Show the current garden level and progress to the next level. + **Fake garden level up** message: - hannibal2 + In 10k garden exp steps after level 15. - + Uses the overflow exp that hypixel still caluclates (maybe official upgrade with more garden levels in the + + Uses the overflow exp that hypixel still calculates (maybe official upgrade with more garden levels in the future?). + Click on the message to open the garden level display. - J10a1n15 + **Farming Weight and Leaderboard** @@ -570,7 +570,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. switching to a different pet for leveling. + **Money per Hour** + Displays the money per hour YOU get with YOUR crop/minute value when selling the items to bazaar. - + Suppports the dicer drops from melon and pumpkins as well. - CalMWolfs + + Supports the dicer drops from melon and pumpkins as well. - CalMWolfs + Supports armor drops. - CalMWolfs + Farming contest timer. + Wrong fungi cutter mode warning. @@ -764,7 +764,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Hide already completed kloon terminal waypoints + **Crux Talisman Progress** Display - HiZe + Show bonuses you get from the talisman -+ **Lazer Parkour** Solver - CalMWolfs ++ **Laser Parkour** Solver - CalMWolfs + Highlights the location of the invisible blocks in the Mirrorverse + Mirrorverse **Dance Room Helper** - HiZe + Helps to solve the dance room in the Mirrorverse by showing multiple tasks at once. @@ -784,7 +784,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Living Metal Suit Progress - HiZe + Display progress Living Metal Suit (Default disabled) + Option to show a compacted version of the overlay when the set is maxed -+ Highlight for Blobbercysts in Bacte fight in colloseum in rift - HiZe ++ Highlight for Blobbercysts in Bacte fight in colosseum in rift - HiZe + Show a line between **Defense blocks** and the mob and highlight the blocks - hannibal2 + Hide particles around Defense Blocks + Show a moving animation between **Living Metal** and the next block - hannibal2 @@ -880,11 +880,11 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Thanks Tobbbb for the coordinates! + Support for hiding basket waypoints once you have clicked on them. - hannibal2 + Option to show only the closest basket. - hannibal2 -+ Help with the 2023 Halloween visitor challenge (ephemeral dingsibumsi or something) - nea ++ Help with the 2023 Halloween visitor challenge (Ephemeral Gratitude) - nea + New Visitor Ping: Pings you when you are less than 10 seconds away from getting a new visitor. + Accept Hotkey: Accept a visitor when you press this keybind while in the visitor GUI. + Support for showing the primal fear data from tab list as GUI elements. - Erymanthus -+ Play warning sound when the next Primal Fear can spawn. - thunderblade73 ++ Play warning sound when the next Primal Fear can spawn. - Thunderblade73 + Unique Gifting Opportunities. - nea + Highlight players who you haven't given gifts to yet. + Only highlight ungifted players while holding a gift. @@ -916,7 +916,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Factory Chat Filters. - RobotHanzo (https://github.com/hannibal002/SkyHanni/pull/1574) + Hide chocolate factory upgrade and employee promotion messages. + Copy Chocolate Factory Stats to clipboard. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) -+ Highlight unbought items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) ++ Highlight non-purchased items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) + Added time tower status to the chocolate factory stats. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1506) + Also can notify you when you get a new charge or your charges are full. + Extra tooltip stats about upgrades for the chocolate factory. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) @@ -991,7 +991,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. -+ Highlights NPCs in the stranded menu that are placeable but havent been placed. - walker ++ Highlights NPCs in the stranded menu that are placeable but haven't been placed. - walker
@@ -1036,7 +1036,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + **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. ++ **Hide dead entities** - Similar to Skytils' feature for inside dungeon, but for everywhere. + **Tps Display** - Show the Tps of the current server. + **Particle Hider** - Hide blaze particles, fire block particles, fireball particles, near redstone particles, far particles or smoke particles. @@ -1084,7 +1084,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Option to highlight items that are full in the sack inventory. + **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 + + Shows kill combo, coins per scavenger, all item drops, bestiary, magic find and more + Each display line is highly customizable + **Frozen Treasure Tracker** (Contributed by CalMWolfs) + Show different items collected while breaking treasures in the Glacial Cave in Jerry's Workshop @@ -1103,7 +1103,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + **Ender Node Tracker** - pretz + Tracks items and profit obtained from collecting ender nodes and killing normal endermen. + **Harp Keybinds** - NetheriteMiner - + In Melodys Harp, press buttons with your number row on the keyboard instead of clicking. + + In Melody's Harp, press buttons with your number row on the keyboard instead of clicking. + **Teleport Pad Compact Name** + Hide the 'Warp to' and 'No Destination' texts over teleport pads. + Only on Private island. @@ -1127,10 +1127,10 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Allows to change those settings anytime again with /shdefaultoptions. + Show alert when reaching max super-pairs clicks. - pretz + Plays a beep sound and sends a message in chat when the player reaches the maximum number of clicks gained for - super-pairs minigames. + super-pairs mini games. + Anniversary Event Active Player Ticket Timer. - nea + Option to play a sound as well. -+ **Travor Trapper** Features in Farming Islands ++ **Trevor Trapper** Features in Farming Islands + Trapper Cooldown GUI. - NetheriteMiner + Show the cooldown on screen in an overlay (intended for abiphone users). + **Trevor the Trapper Tracker**. - CalMWolfs @@ -1145,7 +1145,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Change the scale with plus and minus keys. - CalMWolfs + **Compact Tab List**. + Compacts the tablist to make it look much nicer (old SBA feature, but fewer bugs). - CalMWolfs - + Option to hide Hypixel advertisment banners. - CalMWolfs + + Option to hide Hypixel advertisement banners. - CalMWolfs + **Advanced Player List**. - hannibal2 + Customize the player list (inside the tab list) in various ways. + Change the sort order of players: Default, SkyBlock Level, alphabetical name, Iron Man first/bingo level, @@ -1161,7 +1161,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Show a chat message for how long you were in limbo once you leave it. + Highlight Party Members. - Cad + Marking party members with a bright outline to better find them in the world. -+ Porting SBA's **chroma** into SkyHanni with many more options and chroma everything. - VixidDev ++ Porting SkyBlockAddon's **chroma** into SkyHanni with many more options and chroma everything. - VixidDev + Options to change speed, size, saturation and direction. + Modify Visual Words (command /shwords). - CalMWolfs + Allows you to replace text on your screen with different text (like the SBE one, just less costly). @@ -1256,7 +1256,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Highly customizable: Colors, display sizes. + Estimated Price Integration. + Favorite slots; option to only display favorite slots. -+ Added a Chat Message if the Perkapocalypse Mayor is unknown. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2009) ++ Added a Chat Message if the Perkpocalypse Mayor is unknown. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2009) + Added a source download verification checker. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1914) + Warns you when the mod has been downloaded from an untrusted source (not the official GitHub or Modrinth). + Shows a list of items that can be crafted with the items in your inventory when inside the crafting menu. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1334) diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index 5c9c3017a7e3..b40255449226 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.SkillExpGainEvent -import at.hannibal2.skyhanni.events.SkillOverflowLevelupEvent +import at.hannibal2.skyhanni.events.SkillOverflowLevelUpEvent import at.hannibal2.skyhanni.features.skillprogress.SkillProgress import at.hannibal2.skyhanni.features.skillprogress.SkillType import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.SPACE_SPLITTER @@ -266,7 +266,7 @@ object SkillAPI { currentXp ) if (skillInfo.overflowLevel > 60 && levelOverflow == skillInfo.overflowLevel + 1) - SkillOverflowLevelupEvent(skillType, skillInfo.overflowLevel, levelOverflow).postAndCatch() + SkillOverflowLevelUpEvent(skillType, skillInfo.overflowLevel, levelOverflow).postAndCatch() skillInfo.apply { this.level = level 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 4afced89b68f..959f81973ed5 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -382,7 +382,7 @@ object Commands { ) { SkyHanniDebugsAndTests.toggleRender() } registerCommand( "shcarrolyn", - "Toggels if the specified crops effect is active from carrolyn", + "Toggles if the specified crops effect is active from carrolyn", ) { CaptureFarmingGear.handelCarrolyn(it) } @@ -392,11 +392,11 @@ object Commands { ) { SkyHanniMod.repo.displayRepoStatus(false) } registerCommand( "shclearkismet", - "Cleares the saved values of the applied kismet feathers in Croesus", + "Clears the saved values of the applied kismet feathers in Croesus", ) { CroesusChestTracker.resetChest() } registerCommand( "shkingfix", - "Reseting the local King Talisman Helper offset.", + "Resets the local King Talisman Helper offset.", ) { KingTalismanHelper.kingFix() } registerCommand( "shupdate", @@ -544,7 +544,7 @@ object Commands { "(names, description, orderings and stuff).", ) { SkyHanniDebugsAndTests.resetConfigCommand() } registerCommand( - "readcropmilestonefromclipboard", + "shreadcropmilestonefromclipboard", "Read crop milestone from clipboard. This helps fixing wrong crop milestone data", ) { GardenCropMilestonesCommunityFix.readDataFromClipboard() } registerCommand( diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java index 8b58e49197be..d6a0eb0645eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java @@ -132,8 +132,9 @@ public class DebugConfig { public boolean currentAreaDebug = true; @Expose - @ConfigOption(name = "Oreblock Name", desc = "Show the OreBlock you are currently looking at.") + @ConfigOption(name = "OreBlock Name", desc = "Show the OreBlock you are currently looking at.") @ConfigEditorBoolean + // TODO rename to rayTracedOreBlock public boolean raytracedOreblock = true; @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java index 4d1653b89c8f..132c0d827127 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java @@ -74,7 +74,7 @@ public class DianaConfig { @Expose @ConfigOption(name = "Mythological Creature Tracker", desc = "") @Accordion - // TODO renmae + // TODO rename mythologicalMobTracker public MythologicalMobTrackerConfig mythologicalMobtracker = new MythologicalMobTrackerConfig(); @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/GiftingOpportunitiesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/GiftingOpportunitiesConfig.java index 396ab021750c..53c394469017 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/GiftingOpportunitiesConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/winter/GiftingOpportunitiesConfig.java @@ -15,6 +15,7 @@ public class GiftingOpportunitiesConfig { @Expose @ConfigOption(name = "Only While Holding Gift", desc = "Only highlight players you haven't gifted while holding a gift.") @ConfigEditorBoolean + // TODO highlightWithGiftOnly public boolean highlighWithGiftOnly = true; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java index f2bdf85d5fee..c4bbfacf34b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java @@ -79,7 +79,7 @@ public class GardenConfig { @Expose @ConfigOption(name = "Armor Drop Tracker", desc = "") @Accordion - // TODO renmae to armorDropTracker + // TODO rename to armorDropTracker public ArmorDropTrackerConfig farmingArmorDrop = new ArmorDropTrackerConfig(); @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/ShoppingListConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/ShoppingListConfig.java index e02ddfcc48ee..98226eeb10b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/ShoppingListConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/ShoppingListConfig.java @@ -16,7 +16,7 @@ public class ShoppingListConfig { public boolean display = true; @Expose - // TODO renmae "position" + // TODO rename "position" @ConfigLink(owner = ShoppingListConfig.class, field = "display") public Position pos = new Position(180, 170, false, true); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/ReforgeHelperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/ReforgeHelperConfig.java index 43bba7f8c61b..d479149b8cea 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/ReforgeHelperConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/ReforgeHelperConfig.java @@ -25,7 +25,7 @@ public class ReforgeHelperConfig { public boolean reforgeStonesOnlyHex = true; @Expose - @ConfigOption(name = "Show Diff", desc = "Shows the difference of the new reforge to the current one in the slecetion list.") + @ConfigOption(name = "Show Diff", desc = "Shows the difference of the new reforge to the current one in the selection list.") @ConfigEditorBoolean public boolean showDiff = false; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index cc606e7aaa1c..4a3aa732ea45 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -122,6 +122,7 @@ public class MiscConfig { @ConfigOption(name = "Armor Stands", desc = "Hide armor stands that are sometimes visible for a fraction of a second.") @ConfigEditorBoolean @FeatureToggle + // TODO rename to hideTemporaryArmorStands public boolean hideTemporaryArmorstands = true; @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java index 34939e567bb4..4bf6d57315e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/compacttablist/CompactTabListConfig.java @@ -20,7 +20,7 @@ public class CompactTabListConfig { @ConfigOption( name = "Toggle Tab", desc = "Use the tab key to toggle the tab list, not show tab list while the key is pressed. " + - "Similar to patcher's feature." + "Similar to Patcher's feature." ) @ConfigEditorBoolean public boolean toggleTab = false; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java index 56fa6e686f1f..6689326682b4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/rift/area/stillgorechateau/EffigiesConfig.java @@ -27,6 +27,7 @@ public class EffigiesConfig { maxValue = 15, minStep = 1 ) + // TODO rename respawningSoonTime public int respwningSoonTime = 3; @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index dd4a91fb97eb..94b1dc2837ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -86,7 +86,7 @@ object HypixelData { "solo.profile.amount", "^\\s*(?:§.)*Island\\s*$", ) - private val scoreboardVisitingAmoutPattern by patternGroup.pattern( + private val scoreboardVisitingAmountPattern by patternGroup.pattern( "scoreboard.visiting.amount", "\\s+§.✌ §.\\(§.(?\\d+)§./(?\\d+)\\)", ) @@ -201,7 +201,7 @@ object HypixelData { } fun getMaxPlayersForCurrentServer(): Int { - ScoreboardData.sidebarLinesFormatted.matchFirst(scoreboardVisitingAmoutPattern) { + ScoreboardData.sidebarLinesFormatted.matchFirst(scoreboardVisitingAmountPattern) { return group("maxamount").toInt() } @@ -453,7 +453,7 @@ object HypixelData { islandType = getIslandType(foundIsland, guesting) } - // TODO dont send events when one of the arguments is none, at least when not on sb anymore + // TODO don't send events when one of the arguments is none, at least when not on sb anymore if (skyBlockIsland != islandType) { IslandChangeEvent(islandType, skyBlockIsland).postAndCatch() if (islandType == IslandType.UNKNOWN) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt index dfbb0816418e..29a16944c3d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt @@ -94,7 +94,7 @@ object HypixelBazaarFetcher { failedAttempts++ if (failedAttempts <= HIDDEN_FAILED_ATTEMPTS) { nextFetchTime = SimpleTimeMark.now() + 15.seconds - ChatUtils.debug("$userMessage. (errorMessage=${e.message}, failedAttepmts=$failedAttempts, $fetchType") + ChatUtils.debug("$userMessage. (errorMessage=${e.message}, failedAttempts=$failedAttempts, $fetchType") e.printStackTrace() } else { nextFetchTime = SimpleTimeMark.now() + 15.minutes @@ -102,7 +102,7 @@ object HypixelBazaarFetcher { e, userMessage, "fetchType" to fetchType, - "failedAttepmts" to failedAttempts, + "failedAttempts" to failedAttempts, "rawResponse" to rawResponse, ) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/Graph.kt b/src/main/java/at/hannibal2/skyhanni/data/model/Graph.kt index 76c97e662f93..ab5d1ca2d851 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/Graph.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/Graph.kt @@ -60,7 +60,7 @@ value class Graph( { reader -> reader.beginObject() val list = mutableListOf() - val neigbourMap = mutableMapOf>>() + val neighbourMap = mutableMapOf>>() while (reader.hasNext()) { val id = reader.nextName().toInt() reader.beginObject() @@ -93,10 +93,10 @@ value class Graph( } val node = GraphNode(id, position!!, name) list.add(node) - neigbourMap[node] = neighbors + neighbourMap[node] = neighbors reader.endObject() } - neigbourMap.forEach { (node, edge) -> + neighbourMap.forEach { (node, edge) -> node.neighbours = edge.associate { (id, distance) -> list.first { it.id == id } to distance } diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt index 161ec76f5ad6..6fd65778ecfb 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt @@ -10,6 +10,7 @@ enum class SkyblockStat(val icon: String) { DEFENSE("§a❈"), STRENGTH("§c❁"), INTELLIGENCE("§b✎"), + CRIT_DAMAGE("§9☠"), CRIT_CHANCE("§9☣"), FEROCITY("§c⫽"), diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt b/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt index 22ac4982be1c..f1a5001ad67c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt @@ -75,23 +75,23 @@ class TextInput { } return } - val tcarriage = carriage + val carriage = carriage if (Keyboard.KEY_LEFT.isKeyClicked()) { - carriage = tcarriage?.moveCarriageLeft() ?: (textBox.length - 1) + this.carriage = carriage?.moveCarriageLeft() ?: (textBox.length - 1) return } if (Keyboard.KEY_RIGHT.isKeyClicked()) { - carriage = when { - tcarriage == null -> null - (tcarriage >= textBox.length - 1) -> null - else -> moveCarriageRight(tcarriage) + this.carriage = when { + carriage == null -> null + (carriage >= textBox.length - 1) -> null + else -> moveCarriageRight(carriage) } return } if (Keyboard.KEY_DELETE.isKeyClicked()) { // Does not work for some reason - if (tcarriage != null) { - textBox.removeRange(tcarriage, tcarriage + 1) + if (carriage != null) { + textBox.removeRange(carriage, carriage + 1) } else { textBox.dropLast(1) } @@ -103,27 +103,27 @@ class TextInput { val char = Keyboard.getEventCharacter() textBox = when (char) { Char(0) -> return - '\b' -> if (tcarriage != null) { - if (tcarriage == 0) { + '\b' -> if (carriage != null) { + if (carriage == 0) { textBox.substring(1) } else { - carriage = tcarriage.minus(1) - textBox.removeRange(tcarriage - 1, tcarriage) + this.carriage = carriage.minus(1) + textBox.removeRange(carriage - 1, carriage) } } else { textBox.dropLast(1) } - else -> if (tcarriage != null) { - carriage = tcarriage + 1 - textBox.insert(tcarriage, char) + else -> if (carriage != null) { + this.carriage = carriage + 1 + textBox.insert(carriage, char) } else { textBox + char } } } - private fun moveCarriageRight(tcarriage: Int) = tcarriage + 1 + private fun moveCarriageRight(carriage: Int) = carriage + 1 private fun Int.moveCarriageLeft(): Int = when { this > 0 -> this - 1 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 1e9af5d69e2b..74241946faf2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoUtils.kt @@ -28,8 +28,8 @@ object RepoUtils { /** * Modified from https://www.journaldev.com/960/java-unzip-file-example */ - fun unzipIgnoreFirstFolder(zipFilePath: String, destDir: String) { - val dir = File(destDir) + fun unzipIgnoreFirstFolder(zipFilePath: String, destinationDirectory: String) { + val dir = File(destinationDirectory) // create output directory if it doesn't exist if (!dir.exists()) dir.mkdirs() val fis: FileInputStream @@ -43,7 +43,7 @@ object RepoUtils { if (!ze.isDirectory) { var fileName = ze.name fileName = fileName.substring(fileName.split("/").toTypedArray()[0].length + 1) - val newFile = File(destDir + File.separator + fileName) + val newFile = File(destinationDirectory + File.separator + fileName) // create directories for sub directories in zip File(newFile.parent).mkdirs() if (!isInTree(dir, newFile)) { @@ -71,7 +71,7 @@ object RepoUtils { e, "unzipIgnoreFirstFolder failed", "zipFilePath" to zipFilePath, - "destDir" to destDir, + "destinationDirectory" to destinationDirectory, ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelupEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt similarity index 69% rename from src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelupEvent.kt rename to src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt index ac9d14662db6..d3f356da7f7d 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelupEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events import at.hannibal2.skyhanni.features.skillprogress.SkillType -class SkillOverflowLevelupEvent(val skill: SkillType, val oldLevel: Int, val newLevel: Int) : LorenzEvent() +class SkillOverflowLevelUpEvent(val skill: SkillType, val oldLevel: Int, val newLevel: Int) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt index b04a081eab56..1afa6859dc3f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt @@ -73,7 +73,7 @@ object BingoCardReader { } val done = lore.any { it.contains("GOAL REACHED") } - val communtyGoalPercentage = readCommuntyGoalPercentage(lore) + val communityGoalPercentage = readCommunityGoalPercentage(lore) val hiddenGoalData = getHiddenGoalData(name, description, goalType) val visualDescription = hiddenGoalData.tipNote @@ -89,7 +89,7 @@ object BingoCardReader { this.done = done this.hiddenGoalData = hiddenGoalData } - communtyGoalPercentage?.let { + communityGoalPercentage?.let { bingoGoalDifference(bingoGoal, it) bingoGoal.communtyGoalPercentage = it } @@ -111,7 +111,7 @@ object BingoCardReader { ChatUtils.chat("$color${bingoGoal.displayName}: $oldFormat §b->" + " $newFormat") } - private fun readCommuntyGoalPercentage(lore: List): Double? { + private fun readCommunityGoalPercentage(lore: List): Double? { for (line in lore) { percentagePattern.matchMatcher(line) { return group("percentage").toDouble() / 100 diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/BingoGoal.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/BingoGoal.kt index daccd37e3b1f..64148115d210 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/BingoGoal.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/BingoGoal.kt @@ -25,8 +25,9 @@ class BingoGoal { @Expose lateinit var hiddenGoalData: HiddenGoalData + // TODO rename communityGoalPercentage @Expose - var communtyGoalPercentage: Double? = null // TODO fix typo (Needs changes inside of storage) + var communtyGoalPercentage: Double? = null override fun toString(): String = displayName } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt index 5ed2cdb8ad05..fd2b513cf561 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt @@ -80,7 +80,7 @@ object FlareDisplay { if (!entity.canBeSeen()) continue if (entity.ticksExisted.ticks > MAX_FLARE_TIME) continue if (isAlreadyKnownFlare(entity)) continue - getFlareTypeForTexuture(entity)?.let { + getFlareTypeForTexture(entity)?.let { flares.add(Flare(it, entity)) } } @@ -131,7 +131,7 @@ object FlareDisplay { private fun getFlareForType(type: FlareType): Flare? = flares.firstOrNull { it.type == type } - private fun getFlareTypeForTexuture(entity: EntityArmorStand): FlareType? = + private fun getFlareTypeForTexture(entity: EntityArmorStand): FlareType? = flareSkins.entries.firstOrNull { entity.hasSkullTexture(it.key) }?.value private fun isAlreadyKnownFlare(entity: EntityArmorStand): Boolean = diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt index 5562a4bf4840..3bc12fa4c8a8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt @@ -84,7 +84,7 @@ enum class BossType( DUNGEON_F6_GIANT_1("§eBoulder Tosser", Type.DUNGEON_FLOOR_6, "§eGiant 1"), DUNGEON_F6_GIANT_2("§eSword Thrower", Type.DUNGEON_FLOOR_6, "§eGiant 2"), DUNGEON_F6_GIANT_3("§eBigfoot Jumper", Type.DUNGEON_FLOOR_6, "§eGiant 3"), - DUNGEON_F6_GIANT_4("§eLazer Shooter", Type.DUNGEON_FLOOR_6, "§eGiant 4"), + DUNGEON_F6_GIANT_4("§eLaser Shooter", Type.DUNGEON_FLOOR_6, "§eGiant 4"), DUNGEON_F6_SADAN("§cSadan", Type.DUNGEON_FLOOR_6), // TODO implement @@ -92,7 +92,7 @@ enum class BossType( MINOS_INQUISITOR("§5Minos Inquisitor", Type.DIANA_MOBS), MINOS_CHAMPION("§2Minos Champion", Type.DIANA_MOBS), - GAIA_CONSTURUCT("§2Gaia Construct", Type.DIANA_MOBS), + GAIA_CONSTRUCT("§2Gaia Construct", Type.DIANA_MOBS), MINOTAUR("§2Minotaur", Type.DIANA_MOBS), THUNDER("§cThunder", Type.SEA_CREATURES), @@ -121,7 +121,7 @@ enum class BossType( // TODO arachne - // TODO corelone + // TODO Corleone // TODO bal /** diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index fb549e7c2458..b7af2d72b2d4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -888,7 +888,7 @@ object DamageIndicatorManager { } else { if (entityData != null && isEnabled() && config.hideVanillaNametag && entityData.isConfigEnabled()) { val name = entity.name - if (name.contains("Plaesmaflux")) return + if (name.contains("Plasmaflux")) return if (name.contains("Overflux")) return if (name.contains("Mana Flux")) return if (name.contains("Radiant")) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt index 3d54dce1b166..e9b2f879b693 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt @@ -356,7 +356,7 @@ class MobFinder { } entity.hasMaxHealth(1_500_000) -> { - EntityResult(bossType = BossType.GAIA_CONSTURUCT) + EntityResult(bossType = BossType.GAIA_CONSTRUCT) } entity.hasMaxHealth(100_000_000) -> { diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index 29b3c06e3a6a..3bc3c85d4b2a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -58,6 +58,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import io.github.moulberry.notenoughupdates.util.Utils import io.github.moulberry.notenoughupdates.util.XPInformation import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import org.apache.commons.io.FilenameUtils import java.io.File import java.text.NumberFormat import java.util.Locale @@ -70,8 +71,7 @@ object GhostCounter { val config get() = SkyHanniMod.feature.combat.ghostCounter val storage get() = ProfileStorageData.profileSpecific?.ghostCounter private var display = emptyList>() - var ghostCounterV3File = - File("." + File.separator + "config" + File.separator + "ChatTriggers" + File.separator + "modules" + File.separator + "GhostCounterV3" + File.separator + ".persistantData.json") + var ghostCounterV3File = File(FilenameUtils.separatorsToSystem("./config/ChatTriggers/modules/GhostCounterV3/.persistantData.json")) private val patternGroup = RepoPattern.group("combat.ghostcounter") private val skillXPPattern by patternGroup.pattern( diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt index 05b04982d0d8..b6bcff3bd13e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyChatCommands.kt @@ -96,7 +96,7 @@ object PartyChatCommands { if (isBlockedUser(name)) { if (config.showIgnoredReminder) ChatUtils.clickableChat( "§cIgnoring chat command from ${event.author}. " + - "Unignore them using /shignore remove or click here!", + "Stop ignoring them using /shignore remove or click here!", onClick = { blacklistModify(event.author) }, "§eClick to ignore ${event.author}!", ) diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt index ff6c277bb642..8b2d600695e1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt @@ -147,7 +147,7 @@ object CroesusChestTracker { unopenedPattern.anyMatches(lore) -> OpenedState.UNOPENED else -> ErrorManager.logErrorStateWithData( "Croesus Chest couldn't be read correctly.", - "Openstate check failed for chest.", + "Open state check failed for chest.", "run" to run, "lore" to lore ).run { null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index d79ac47ce8dd..f8d432613084 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -249,7 +249,7 @@ object DungeonAPI { val bossCollections = bossStorage ?: return if (event.inventoryName == "Boss Collections") { - readallCollections(bossCollections, event.inventoryItems) + readAllCollections(bossCollections, event.inventoryItems) } else if (event.inventoryName.endsWith(" Collection")) { readOneMaxCollection(bossCollections, event.inventoryItems, event.inventoryName) } @@ -278,7 +278,7 @@ object DungeonAPI { } } - private fun readallCollections( + private fun readAllCollections( bossCollections: MutableMap, inventoryItems: Map, ) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index 9d2c531a5a93..f0ce80b1b18e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -151,7 +151,7 @@ object DungeonHideItems { } if (config.hideHealerFairy) { - // Healer Fairy texture is stored in id 0, not id 4 for some reasos. + // Healer Fairy texture is stored in id 0, not id 4 for some reasons. if (entity.inventory[0]?.getSkullTexture() == HEALER_FAIRY_TEXTURE) { event.cancel() return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index d88f5c017180..20cf553b802c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -120,7 +120,7 @@ object DianaFixChat { if (hasSetToggleMusic) { ChatUtils.chat("Toggling the hypixel music has worked, good job!") } else if (hasSetParticleQuality) { - ChatUtils.chat("Changing the particle qualilty has worked, good job!") + ChatUtils.chat("Changing the particle quality has worked, good job!") } hasSetParticleQuality = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 6fe2870216c7..35a783f7d93f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -380,8 +380,8 @@ object GriffinBurrowHelper { val text = "§bWarp to " + warp.displayName val keybindSuffix = if (config.keyBindWarp != Keyboard.KEY_NONE) { - val keyname = KeyboardManager.getKeyName(config.keyBindWarp) - " §7(§ePress $keyname§7)" + val keyName = KeyboardManager.getKeyName(config.keyBindWarp) + " §7(§ePress $keyName§7)" } else "" if (lastTitleSentTime.passedSince() > 2.seconds) { lastTitleSentTime = SimpleTimeMark.now() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt index d290c5df8dc2..0bb5e3dc17a4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt @@ -36,7 +36,7 @@ object SoopyGuessBurrow { private var guessPoint: LorenzVec? = null private var lastSoundPoint: LorenzVec? = null - private var locs = mutableListOf() + private var locations = mutableListOf() private var dingSlope = mutableListOf() @@ -81,7 +81,7 @@ object SoopyGuessBurrow { lastSoundPoint = null firstParticlePoint = null distance = null - locs.clear() + locations.clear() } if (lastDingPitch == 0f) { @@ -91,7 +91,7 @@ object SoopyGuessBurrow { lastParticlePoint2 = null lastSoundPoint = null firstParticlePoint = null - locs.clear() + locations.clear() return } @@ -158,19 +158,19 @@ object SoopyGuessBurrow { } } if (run) { - if (locs.size < 100 && locs.isEmpty() || locs.last().distance(currLoc) != 0.0) { + if (locations.size < 100 && locations.isEmpty() || locations.last().distance(currLoc) != 0.0) { var distMultiplier = 1.0 - if (locs.size > 2) { - val predictedDist = 0.06507 * locs.size + 0.259 - val lastPos = locs.last() + if (locations.size > 2) { + val predictedDist = 0.06507 * locations.size + 0.259 + val lastPos = locations.last() val actualDist = currLoc.distance(lastPos) distMultiplier = actualDist / predictedDist } - locs.add(currLoc) + locations.add(currLoc) - if (locs.size > 5 && guessPoint != null) { + if (locations.size > 5 && guessPoint != null) { - val slopeThing = locs.zipWithNext { a, b -> + val slopeThing = locations.zipWithNext { a, b -> atan((a.x - b.x) / (a.z - b.z)) } @@ -186,14 +186,14 @@ object SoopyGuessBurrow { val pr2 = mutableListOf() val start = slopeThing.size - 1 - val lastPos = locs[start].toDoubleArray() - val lastPos2 = locs[start].toDoubleArray() + val lastPos = locations[start].toDoubleArray() + val lastPos2 = locations[start].toDoubleArray() var distCovered = 0.0 - val ySpeed = locs[locs.size - 1].x - locs[locs.size - 2].x / hypot( - locs[locs.size - 1].x - locs[locs.size - 2].x, - locs[locs.size - 1].z - locs[locs.size - 2].x + val ySpeed = locations[locations.size - 1].x - locations[locations.size - 2].x / hypot( + locations[locations.size - 1].x - locations[locations.size - 2].x, + locations[locations.size - 1].z - locations[locations.size - 2].x ) var i = start + 1 diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt index 44adceb6d584..3ae865ac82a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt @@ -360,12 +360,12 @@ object GardenPlotAPI { // Render horizontal val buildLimit = minHeight + 11 - val ints = if (showBuildLimit) { + val iterable = if (showBuildLimit) { (minHeight..maxHeight step 4) + buildLimit } else { minHeight..maxHeight step 4 } - for (y in ints) { + for (y in iterable) { val start = LorenzVec(chunkMinX, y, chunkMinZ) val isRedLine = y == buildLimit val color = if (isRedLine) Color.red else lineColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt index b3fd91d32a8d..3e99c2683fd2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt @@ -116,7 +116,7 @@ object JacobContestTimeNeeded { ) { var lowBPSWarning = listOf() val rawSpeed = speed.toDouble() - val speedForFormular = crop.getBps()?.let { + val speedForFormula = crop.getBps()?.let { if (it < 15) { val v = rawSpeed / it (v * 19.9).toInt() @@ -132,7 +132,7 @@ object JacobContestTimeNeeded { showLine = "§9${crop.cropName} §cBracket not revealed!" continue } - val timeInMinutes = (amount.toDouble() / speedForFormular).seconds + val timeInMinutes = (amount.toDouble() / speedForFormula).seconds val formatDuration = timeInMinutes.format() val color = if (timeInMinutes < 20.minutes) "§b" else "§c" var marking = "" diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt index 926f83d501b8..6494986afbb0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/CropPage.kt @@ -53,7 +53,7 @@ class CropPage(val crop0: () -> CropType, sizeX: Int, sizeY: Int, paddingX: Int FortuneStats.entries.filter { it.isActive() && it !in headers }.map { it.getFarmingBar() } private fun equipDisplay(): Renderable = - Renderable.fixedSizeCollum( + Renderable.fixedSizeColumn( Renderable.verticalContainer( listOf( crop.farmingItem.getDisplay(), diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt index 0e891f44470f..a5b3a97b8b3a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt @@ -50,7 +50,7 @@ object FixGhostEntities { recentlySpawnedEntities.addLast(packet.entityID) } else if (packet is S13PacketDestroyEntities) { for (entityID in packet.entityIDs) { - // ingore entities that got properly spawned and then removed + // ignore entities that got properly spawned and then removed if (entityID !in recentlySpawnedEntities) { recentlyRemovedEntities.addLast(entityID) if (recentlyRemovedEntities.size == 10) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt index 1f1f9dadd1e0..9953199c8695 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt @@ -55,7 +55,7 @@ object PatcherSendCoordinates { split.first().toFloat() } else end.toFloat() patcherBeacon.add(PatcherBeacon(LorenzVec(x, y, z), description, System.currentTimeMillis() / 1000)) - logger.log("got patcher coords and username") + logger.log("got Patcher coords and username") } } @@ -76,10 +76,10 @@ object PatcherSendCoordinates { if (!event.isMod(10)) return val location = LocationUtils.playerLocation() - // removed patcher beacon! + // removed Patcher beacon! patcherBeacon.removeIf { System.currentTimeMillis() / 1000 > it.time + 5 && location.distanceIgnoreY(it.location) < 5 } - // removed patcher beacon after time! + // removed Patcher beacon after time! patcherBeacon.removeIf { System.currentTimeMillis() / 1000 > it.time + config.duration } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt index ac101a9096b2..518ebbaf929f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt @@ -39,9 +39,9 @@ object AdvancedPlayerList { ".*\\[(?.*)] §r(?.*)" ) - private var playerDatas = mutableMapOf() + private var playerData = mutableMapOf() - fun createTabLine(text: String, type: TabStringType) = playerDatas[text]?.let { + fun createTabLine(text: String, type: TabStringType) = playerData[text]?.let { TabLine(text, type, createCustomName(it)) } ?: TabLine(text, type) @@ -90,7 +90,7 @@ object AdvancedPlayerList { currentData[line] = it } } - playerDatas = currentData + playerData = currentData val prepare = currentData.entries val sorted = when (config.playerSortOrder) { @@ -127,7 +127,7 @@ object AdvancedPlayerList { } newList.addAll(newPlayerList) - val rest = original.drop(playerDatas.size + extraTitles + 1) + val rest = original.drop(playerData.size + extraTitles + 1) newList.addAll(rest) return newList } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordLocationKey.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordLocationKey.kt index baeb1df046af..96759bc7d2e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordLocationKey.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordLocationKey.kt @@ -206,7 +206,7 @@ object DiscordLocationKey { "The Wasteland", "Throne Room" ) - // list of nether locations because there are sooo many (truncated some according to scoreboard) + // list of nether locations because there are soo many (truncated some according to scoreboard) private val specialRiftRPC = mapOf( "Enigma's Crib" to "wyld-woods", diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt index 2888cc7071d9..0a0b6b238181 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt @@ -41,10 +41,10 @@ object LimboTimeTracker { private const val FIRE_MULTIPLIER = 1.01F private var onFire = false - private val bedwarsLobbyLimbo = AxisAlignedBB(-662.0, 43.0, -76.0, -619.0, 86.0, -27.0) + private val bedWarsLobbyLimbo = AxisAlignedBB(-662.0, 43.0, -76.0, -619.0, 86.0, -27.0) private var doMigrate = false - private var unmigratedPB = 0 + private var notMigratedPB = 0 @SubscribeEvent fun onChat(event: LorenzChatEvent) { @@ -74,7 +74,7 @@ object LimboTimeTracker { } val lobbyName: String? = HypixelData.locrawData?.get("lobbyname")?.asString if (lobbyName.toString().startsWith("bedwarslobby")) { - if (bedwarsLobbyLimbo.isPlayerInside()) { + if (bedWarsLobbyLimbo.isPlayerInside()) { if (inFakeLimbo) return limboJoinTime = SimpleTimeMark.now() inLimbo = true @@ -182,23 +182,23 @@ object LimboTimeTracker { fun workaroundMigration(personalBest: Int) { doMigrate = true - unmigratedPB = personalBest + notMigratedPB = personalBest } @SubscribeEvent fun onHypixelJoin(event: HypixelJoinEvent) { if (!doMigrate) return - if (unmigratedPB != 0) { + if (notMigratedPB != 0) { ChatUtils.debug("Migrating limbo personalBest") - storage?.personalBest = unmigratedPB - storage?.userLuck = unmigratedPB * USER_LUCK_MULTIPLIER + storage?.personalBest = notMigratedPB + storage?.userLuck = notMigratedPB * USER_LUCK_MULTIPLIER } if ((storage?.personalBest ?: 0) > (storage?.playtime ?: 0)) { ChatUtils.debug("Migrating limbo playtime") storage?.playtime = (storage?.personalBest ?: 0) } doMigrate = false - unmigratedPB = 0 + notMigratedPB = 0 } fun isEnabled() = config.showTimeInLimbo diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt index 686f46827cef..c5d4f5ea43bd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt @@ -173,7 +173,7 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { } } - // TODO remove this workaround once hypixel fixes the bug that amount is not in tab list for minibosses + // TODO remove this workaround once hypixel fixes the bug that amount is not in tab list for mini bosses private fun fixMinibossAmount(quest: Quest, stack: ItemStack) { if (quest !is MiniBossQuest) return val storedAmount = quest.needAmount diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index 647b2280b43d..ccb432f61905 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -74,7 +74,7 @@ object RiftBloodEffigies { fun onRepoReload(event: RepositoryReloadEvent) { val newLocations = event.getConstant("RiftEffigies").locations if (newLocations.size != 6) { - error("Invalid rift effigies size: ${newLocations.size} (expeced 6)") + error("Invalid rift effigies size: ${newLocations.size} (expected 6)") } locations = newLocations } diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt index 2e033b7e45b5..d2a98daed4d2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillProgress.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent -import at.hannibal2.skyhanni.events.SkillOverflowLevelupEvent +import at.hannibal2.skyhanni.events.SkillOverflowLevelUpEvent import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.XP_NEEDED_FOR_60 import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils.chat @@ -156,7 +156,7 @@ object SkillProgress { } @SubscribeEvent - fun onLevelUp(event: SkillOverflowLevelupEvent) { + fun onLevelUp(event: SkillOverflowLevelUpEvent) { if (!isEnabled()) return if (!config.overflowConfig.enableInChat) return val skillName = event.skill.displayName diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt index 92c76e4937bd..372c7daa9f6b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt @@ -86,7 +86,7 @@ object SlayerProfitTracker { private val ItemTrackerData.TrackedItem.timesDropped get() = timesGained private fun addSlayerCosts(price: Double) { - require(price < 0) { "slayer costs can not be positve" } + require(price < 0) { "slayer costs can not be positive" } getTracker()?.modify { it.slayerSpawnCost += price.toInt() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt index 1d434e298b82..26e0822b196e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt @@ -145,11 +145,11 @@ object SlayerRngMeterDisplay { fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return - readRngmeterInventory(event) + readRngMeterInventory(event) readSlayerInventory(event) } - private fun readRngmeterInventory(event: InventoryFullyOpenedEvent) { + private fun readRngMeterInventory(event: InventoryFullyOpenedEvent) { val name = inventoryNamePattern.matchMatcher(event.inventoryName) { group("name") } ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index c59747c09fa5..c57c473c5fd6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -180,7 +180,7 @@ object EndermanSlayerFeatures { it.isDead } - // Removing the beacon if It's still there after 7 sesconds. + // Removing the beacon if It's still there after 7 seconds. // This is just a workaround for the cases where the ServerBlockChangeEvent don't detect the beacon despawn info. val toRemove = sittingBeacon.filter { it.value.passedSince() > 7.seconds } if (toRemove.isNotEmpty()) { diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java index d762dbb22507..2635874a3ec7 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java @@ -9,7 +9,7 @@ public interface AccessorRendererLivingEntity extends AccessorRender { @Invoker("setBrightness") - boolean setBrightness_skyhanni(T entitylivingbaseIn, float partialTicks, boolean combineTextures); + boolean setBrightness_skyhanni(T entityLivingBaseIn, float partialTicks, boolean combineTextures); @Invoker("unsetBrightness") void setBrightness_skyhanni(); diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinContributorRendererEntityLiving.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinContributorRendererEntityLiving.java index 7ffcfef8fdff..6fb71ccc0a4f 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinContributorRendererEntityLiving.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/renderer/MixinContributorRendererEntityLiving.java @@ -28,7 +28,7 @@ private String checkNameForUpsideDown(String displayName) { @Redirect( method = "rotateCorpse", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/EntityPlayer;isWearing(Lnet/minecraft/entity/player/EnumPlayerModelParts;)Z")) - private boolean alwaysMarkAsHavingCape(EntityPlayer instance, EnumPlayerModelParts p_175148_1_) { + private boolean alwaysMarkAsHavingCape(EntityPlayer instance, EnumPlayerModelParts enumPlayerModelParts) { // Always returning true here ensures maximal compatibility with other mods. This will no longer block other mods from implementing this same mixin. return true; } diff --git a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt index 5898b5d98d46..4bf183d74fbf 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/TestCopyBestiaryValues.kt @@ -24,7 +24,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object TestCopyBestiaryValues { - class BestiarityObject { // TODO fix typo + class BestiaryObject { // TODO fix typo @Expose var name: String = "" @@ -72,7 +72,7 @@ object TestCopyBestiaryValues { private fun copy(titleItem: ItemStack, inventoryItems: Map) { val titleName = titleItem.name.removeWordsAtEnd(1) - val obj = BestiarityObject() + val obj = BestiaryObject() obj.name = titleName obj.texture = titleItem.getSkullTexture() ?: "no texture found" obj.skullOwner = titleItem.getSkullOwner() ?: "no skullOwner found" diff --git a/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportImpl.kt b/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportImpl.kt index 45b81a1abd9c..a42a10faf858 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportImpl.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/hotswap/HotswapSupportImpl.kt @@ -37,7 +37,7 @@ class HotswapSupportImpl : HotswapSupportHandle { ?.makeAccessible() ?.removeFinal() if (instanceField != null) { - ChatUtils.chat("Reinjected static instance $newInstance!") + ChatUtils.chat("Re-injected static instance $newInstance!") instanceField.set(null, newInstance) } SkyHanniMod.modules.add(newInstance) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt index 5edd33bc019d..0ea909851fc2 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt @@ -113,10 +113,10 @@ object CombatUtils { /** * Taken from NotEnoughUpdates */ - fun interp(now: Float, last: Float, lastupdate: Long): Float { + fun interp(now: Float, last: Float, lastUpdate: Long): Float { var interp = now if (last >= 0 && last != now) { - var factor = (System.currentTimeMillis() - lastupdate) / 1000f + var factor = (System.currentTimeMillis() - lastUpdate) / 1000f factor = LerpUtils.clampZeroOne(factor) interp = last + (now - last) * factor } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt index 889530cd622e..97225369d6b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt @@ -37,7 +37,7 @@ import java.lang.reflect.Method object EntityOutlineRenderer { private val entityRenderCache: CachedInfo = CachedInfo(null, null, null) - private var stopLookingForOptifine = false + private var stopLookingForOptiFine = false private var isMissingMixin = false private var isFastRender: Method? = null private var isShaders: Method? = null @@ -56,13 +56,13 @@ object EntityOutlineRenderer { */ private fun initSwapBuffer(): Framebuffer { val main = mc.framebuffer - val framebuffer = Framebuffer(main.framebufferTextureWidth, main.framebufferTextureHeight, true) - framebuffer.setFramebufferFilter(GL11.GL_NEAREST) - framebuffer.setFramebufferColor(0.0f, 0.0f, 0.0f, 0.0f) - return framebuffer + val frameBuffer = Framebuffer(main.framebufferTextureWidth, main.framebufferTextureHeight, true) + frameBuffer.setFramebufferFilter(GL11.GL_NEAREST) + frameBuffer.setFramebufferColor(0.0f, 0.0f, 0.0f, 0.0f) + return frameBuffer } - private fun updateFramebufferSize() { + private fun updateFrameBufferSize() { val width = mc.displayWidth val height = mc.displayHeight if (swapBuffer.framebufferWidth != width || swapBuffer.framebufferHeight != height) { @@ -94,7 +94,7 @@ object EntityOutlineRenderer { val renderGlobal = mc.renderGlobal as CustomRenderGlobal val renderManager = mc.renderManager mc.theWorld.theProfiler.endStartSection("entityOutlines") - updateFramebufferSize() + updateFrameBufferSize() // Clear and bind the outline framebuffer renderGlobal.frameBuffer.framebufferClear() @@ -216,7 +216,7 @@ object EntityOutlineRenderer { } /** - * Caches optifine settings and determines whether outlines should be rendered + * Caches OptiFine settings and determines whether outlines should be rendered * * @return `true` iff outlines should be rendered */ @@ -232,8 +232,8 @@ object EntityOutlineRenderer { val renderGlobal = mc.renderGlobal as CustomRenderGlobal if (renderGlobal.frameBuffer == null || renderGlobal.shader == null || mc.thePlayer == null) return false - // Optifine Conditions - if (!stopLookingForOptifine && isFastRender == null) { + // OptiFine Conditions + if (!stopLookingForOptiFine && isFastRender == null) { try { val config = Class.forName("Config") try { @@ -241,12 +241,12 @@ object EntityOutlineRenderer { isShaders = config.getMethod("isShaders") isAntialiasing = config.getMethod("isAntialiasing") } catch (ex: Exception) { - logger.log("Couldn't find Optifine methods for entity outlines.") - stopLookingForOptifine = true + logger.log("Couldn't find OptiFine methods for entity outlines.") + stopLookingForOptiFine = true } } catch (ex: Exception) { - logger.log("Couldn't find Optifine for entity outlines.") - stopLookingForOptifine = true + logger.log("Couldn't find OptiFine for entity outlines.") + stopLookingForOptiFine = true } } var isFastRenderValue = false @@ -258,9 +258,9 @@ object EntityOutlineRenderer { isShadersValue = isShaders!!.invoke(null) as Boolean isAntialiasingValue = isAntialiasing!!.invoke(null) as Boolean } catch (ex: IllegalAccessException) { - logger.log("An error occurred while calling Optifine methods for entity outlines... $ex") + logger.log("An error occurred while calling OptiFine methods for entity outlines... $ex") } catch (ex: InvocationTargetException) { - logger.log("An error occurred while calling Optifine methods for entity outlines... $ex") + logger.log("An error occurred while calling OptiFine methods for entity outlines... $ex") } } return !isFastRenderValue && !isShadersValue && !isAntialiasingValue @@ -373,15 +373,15 @@ object EntityOutlineRenderer { val xrayOutlineEvent = RenderEntityOutlineEvent(RenderEntityOutlineEvent.Type.XRAY, null) xrayOutlineEvent.postAndCatch() // Get all entities to render no xray outlines, using pre-filtered entities (no need to test xray outlined entities) - val noxrayOutlineEvent = RenderEntityOutlineEvent( + val noXrayOutlineEvent = RenderEntityOutlineEvent( RenderEntityOutlineEvent.Type.NO_XRAY, xrayOutlineEvent.entitiesToChooseFrom ) - noxrayOutlineEvent.postAndCatch() + noXrayOutlineEvent.postAndCatch() // Cache the entities for future use entityRenderCache.xrayCache = xrayOutlineEvent.entitiesToOutline - entityRenderCache.noXrayCache = noxrayOutlineEvent.entitiesToOutline - entityRenderCache.noOutlineCache = noxrayOutlineEvent.entitiesToChooseFrom + entityRenderCache.noXrayCache = noXrayOutlineEvent.entitiesToOutline + entityRenderCache.noOutlineCache = noXrayOutlineEvent.entitiesToChooseFrom emptyLastTick = if (isCacheEmpty()) { if (!emptyLastTick) { renderGlobal.frameBuffer.framebufferClear() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt index ab0afd93c50f..d2c24cecae34 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/InventoryUtils.kt @@ -76,7 +76,7 @@ object InventoryUtils { val booleanField = storage.javaClass.getDeclaredField("enableStorageGUI3") booleanField.get(storage) as Boolean } catch (e: Throwable) { - ErrorManager.logErrorWithData(e, "Could not read NEU config to determine if the neu storage is emabled.") + ErrorManager.logErrorWithData(e, "Could not read NEU config to determine if the neu storage is enabled.") false } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index c094df489071..5edc227dd85a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -295,7 +295,7 @@ object ItemUtils { private val itemAmountCache = mutableMapOf>() fun readItemAmount(originalInput: String): Pair? { - // This workaround fixes 'Tubto Cacti I Book' + // This workaround fixes 'Turbo Cacti I Book' val input = (if (originalInput.endsWith(" Book")) { originalInput.replace(" Book", "") } else originalInput).removeResets() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt index e322b5ae36b6..b9a790d31a9f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LocationUtils.kt @@ -62,9 +62,9 @@ object LocationUtils { val t1 = (this.minBox() - origin) * rayDirectionInverse val t2 = (this.maxBox() - origin) * rayDirectionInverse - val tmin = max(t1.minOfEachElement(t2).max(), Double.NEGATIVE_INFINITY) - val tmax = min(t1.maxOfEachElement(t2).min(), Double.POSITIVE_INFINITY) - return tmax >= tmin && tmax >= 0.0 + val tMin = max(t1.minOfEachElement(t2).max(), Double.NEGATIVE_INFINITY) + val tMax = min(t1.maxOfEachElement(t2).min(), Double.POSITIVE_INFINITY) + return tMax >= tMin && tMax >= 0.0 } fun AxisAlignedBB.union(aabbs: List?): AxisAlignedBB? { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index ee9228609f7f..ea2a935a3079 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -126,7 +126,7 @@ object LorenzUtils { val EntityLivingBase.baseMaxHealth: Int get() = this.getEntityAttribute(SharedMonsterAttributes.maxHealth).baseValue.toInt() - // TODO create extenstion function + // TODO create extension function fun formatPercentage(percentage: Double): String = formatPercentage(percentage, "0.00") fun formatPercentage(percentage: Double, format: String?): String = diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index fe9e9df6a1fe..1f389e51b766 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -215,7 +215,7 @@ object RenderUtils { val bottomOffset = 0 val topOffset = bottomOffset + height val tessellator = Tessellator.getInstance() - val worldrenderer = tessellator.worldRenderer + val worldRenderer = tessellator.worldRenderer Minecraft.getMinecraft().textureManager.bindTexture(beaconBeam) GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0f) GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0f) @@ -244,59 +244,59 @@ object RenderUtils { val d11 = 0.5 + sin(d2 + 5.497787143782138) * 0.2 val d14 = -1.0 + d1 val d15 = height.toDouble() * 2.5 + d14 - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR) - worldrenderer.pos(x + d4, y + topOffset, z + d5).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR) + worldRenderer.pos(x + d4, y + topOffset, z + d5).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d4, y + bottomOffset, z + d5).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d6, y + bottomOffset, z + d7).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d6, y + topOffset, z + d7).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d4, y + bottomOffset, z + d5).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d6, y + bottomOffset, z + d7).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d6, y + topOffset, z + d7).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d10, y + topOffset, z + d11).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d10, y + topOffset, z + d11).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d10, y + bottomOffset, z + d11).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d8, y + bottomOffset, z + d9).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d8, y + topOffset, z + d9).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d10, y + bottomOffset, z + d11).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d8, y + bottomOffset, z + d9).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d8, y + topOffset, z + d9).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d6, y + topOffset, z + d7).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d6, y + topOffset, z + d7).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d6, y + bottomOffset, z + d7).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d10, y + bottomOffset, z + d11).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d10, y + topOffset, z + d11).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d6, y + bottomOffset, z + d7).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d10, y + bottomOffset, z + d11).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d10, y + topOffset, z + d11).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d8, y + topOffset, z + d9).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d8, y + topOffset, z + d9).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + d8, y + bottomOffset, z + d9).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d4, y + bottomOffset, z + d5).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() - worldrenderer.pos(x + d4, y + topOffset, z + d5).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) + worldRenderer.pos(x + d8, y + bottomOffset, z + d9).tex(1.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d4, y + bottomOffset, z + d5).tex(0.0, d14).color(r, g, b, 1.0f).endVertex() + worldRenderer.pos(x + d4, y + topOffset, z + d5).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier) .endVertex() tessellator.draw() GlStateManager.disableCull() val d12 = -1.0 + d1 val d13 = height + d12 - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR) - worldrenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR) + worldRenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() - worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() - worldrenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) + worldRenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex() + worldRenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier) .endVertex() tessellator.draw() } @@ -809,19 +809,19 @@ object RenderUtils { bindCamera() val tessellator = Tessellator.getInstance() - val worldrenderer = tessellator.worldRenderer - worldrenderer.begin(GL11.GL_QUAD_STRIP, DefaultVertexFormats.POSITION) + val worldRenderer = tessellator.worldRenderer + worldRenderer.begin(GL11.GL_QUAD_STRIP, DefaultVertexFormats.POSITION) var currentAngle = 0f val angleStep = 0.1f while (currentAngle < 2 * Math.PI) { val xOffset = radius * cos(currentAngle.toDouble()).toFloat() val zOffset = radius * sin(currentAngle.toDouble()).toFloat() - worldrenderer.pos(x + xOffset, y + height, z + zOffset).endVertex() - worldrenderer.pos(x + xOffset, y + 0, z + zOffset).endVertex() + worldRenderer.pos(x + xOffset, y + height, z + zOffset).endVertex() + worldRenderer.pos(x + xOffset, y + 0, z + zOffset).endVertex() currentAngle += angleStep } - worldrenderer.pos(x + radius, y + height, z).endVertex() - worldrenderer.pos(x + radius, y + 0.0, z).endVertex() + worldRenderer.pos(x + radius, y + height, z).endVertex() + worldRenderer.pos(x + radius, y + 0.0, z).endVertex() tessellator.draw() GlStateManager.enableCull() @@ -1388,9 +1388,9 @@ object RenderUtils { GlStateManager.depthMask(false) } GlStateManager.color(color.red / 255f, color.green / 255f, color.blue / 255f, color.alpha / 255f) - val ctrlpoints = p1.toFloatArray() + p2.toFloatArray() + p3.toFloatArray() + val ctrlPoints = p1.toFloatArray() + p2.toFloatArray() + p3.toFloatArray() bezier2Buffer.clear() - ctrlpoints.forEach { + ctrlPoints.forEach { bezier2Buffer.put(it) } bezier2Buffer.flip() @@ -1477,8 +1477,6 @@ object RenderUtils { GlStateManager.disableTexture2D() GlStateManager.disableCull() - val tessellator = Tessellator.getInstance() - GlStateManager.pushMatrix() RenderUtils.translate(getViewerPos(partialTicks).negated()) getViewerPos(partialTicks) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 1780764cdfcc..2b3ece2c721e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -327,7 +327,7 @@ object SkyBlockItemModifierUtils { fun getByName(name: String): GemstoneSlotType = entries.firstOrNull { name.uppercase(Locale.ENGLISH).contains(it.name) } - ?: error("Unknwon GemstoneSlotType: '$name'") + ?: error("Unknown GemstoneSlotType: '$name'") fun getColorCode(name: String) = getByName(name).colorCode } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt index b51c83295023..b12668d72b8f 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt @@ -250,10 +250,16 @@ interface Renderable { val openGui = guiScreen?.javaClass?.name ?: "none" val isInNeuPv = openGui == "io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer" val neuFocus = NEUItems.neuHasFocus() - val isInSkyTilsPv = openGui == "gg.skytils.skytilsmod.gui.profile.ProfileGui" + val isInSkytilsPv = openGui == "gg.skytils.skytilsmod.gui.profile.ProfileGui" - val result = isGuiScreen && isGuiPositionEditor && inMenu && isNotInSignAndOnSlot && isConfigScreen && - !isInNeuPv && !isInSkyTilsPv && !neuFocus + val result = isGuiScreen && + isGuiPositionEditor && + inMenu && + isNotInSignAndOnSlot && + isConfigScreen && + !isInNeuPv && + !isInSkytilsPv && + !neuFocus if (debug) { if (!result) { @@ -266,7 +272,7 @@ interface Renderable { if (!isConfigScreen) logger.log("isConfigScreen") if (isInNeuPv) logger.log("isInNeuPv") if (neuFocus) logger.log("neuFocus") - if (isInSkyTilsPv) logger.log("isInSkyTilsPv") + if (isInSkytilsPv) logger.log("isInSkytilsPv") logger.log("") } else { logger.log("allowed click") @@ -647,7 +653,7 @@ interface Renderable { } } - fun fixedSizeCollum( + fun fixedSizeColumn( content: Renderable, height: Int, horizontalAlign: HorizontalAlignment = HorizontalAlignment.LEFT, diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index 8f55a8b1f56f..8d26cf46afc5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -58,7 +58,7 @@ object RepoPatternManager { */ private var usedKeys: NavigableMap> = TreeMap() - private var wasPreinitialized = false + private var wasPreInitialized = false private val isInDevEnv = try { Launch.blackboard["fml.deobfuscatedEnvironment"] as Boolean } catch (_: Exception) { @@ -261,7 +261,7 @@ object RepoPatternManager { @HandleEvent fun onPreInitFinished(event: PreInitFinishedEvent) { - wasPreinitialized = true + wasPreInitialized = true val dumpDirective = System.getenv("SKYHANNI_DUMP_REGEXES") if (dumpDirective.isNullOrBlank()) return val (sourceLabel, path) = dumpDirective.split(":", limit = 2) @@ -274,7 +274,7 @@ object RepoPatternManager { fun of(key: String, fallback: String, parentKeyHolder: RepoPatternKeyOwner? = null): RepoPattern { verifyKeyShape(key) - if (wasPreinitialized && !config.tolerateLateRegistration) { + if (wasPreInitialized && !config.tolerateLateRegistration) { crash("Illegal late initialization of repo pattern. Repo pattern needs to be created during pre-initialization.") } if (key in usedKeys) { @@ -289,7 +289,7 @@ object RepoPatternManager { parentKeyHolder: RepoPatternKeyOwner? = null, ): RepoPatternList { verifyKeyShape(key) - if (wasPreinitialized && !config.tolerateLateRegistration) { + if (wasPreInitialized && !config.tolerateLateRegistration) { crash("Illegal late initialization of repo pattern. Repo pattern needs to be created during pre-initialization.") } if (key in usedKeys) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt index c110d6d6e0f1..83e8121494a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/Shader.kt @@ -66,7 +66,7 @@ abstract class Shader(val vertex: String, val fragment: String) { ShaderHelper.glLinkProgram(shaderProgram) - if (ShaderHelper.glGetProgrami(shaderProgram, ShaderHelper.GL_LINK_STATUS) == GL11.GL_FALSE) { + if (ShaderHelper.glGetProgramInt(shaderProgram, ShaderHelper.GL_LINK_STATUS) == GL11.GL_FALSE) { val errorMessage = "Failed to link vertex shader $vertex and fragment shader $fragment. Features that " + "utilise this shader will not work correctly, if at all" val errorLog = StringUtils.trim(ShaderHelper.glGetShaderInfoLog(shaderProgram, 1024)) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt index 89efd7d9f183..1e8062500340 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt @@ -82,11 +82,11 @@ class ShaderHelper { ) else GL20.glGetProgramInfoLog(program, maxLength) } - fun glGetProgrami(program: Int, pname: Int): Int { + fun glGetProgramInt(program: Int, pName: Int): Int { return if (USING_ARB_SHADERS) ARBShaderObjects.glGetObjectParameteriARB( program, - pname - ) else GL20.glGetProgrami(program, pname) + pName + ) else GL20.glGetProgrami(program, pName) } fun glUseProgram(program: Int) { @@ -115,11 +115,11 @@ class ShaderHelper { if (USING_ARB_SHADERS) ARBShaderObjects.glCompileShaderARB(shader) else GL20.glCompileShader(shader) } - fun glGetShaderi(shader: Int, pname: Int): Int { + fun glGetShaderInt(shader: Int, pName: Int): Int { return if (USING_ARB_SHADERS) ARBShaderObjects.glGetObjectParameteriARB( shader, - pname - ) else GL20.glGetShaderi(shader, pname) + pName + ) else GL20.glGetShaderi(shader, pName) } fun glGetShaderInfoLog(shader: Int, maxLength: Int): String { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt index 057e0a031945..39a2fe302d3a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt @@ -71,7 +71,7 @@ object ShaderManager { ShaderHelper.glShaderSource(shaderID, source.toString()) ShaderHelper.glCompileShader(shaderID) - if (ShaderHelper.glGetShaderi(shaderID, ShaderHelper.GL_COMPILE_STATUS) == 0) { + if (ShaderHelper.glGetShaderInt(shaderID, ShaderHelper.GL_COMPILE_STATUS) == 0) { val errorMessage = "Failed to compile shader $fileName${type.extension}. Features that utilise this " + "shader will not work correctly, if at all" val errorLog = StringUtils.trim(ShaderHelper.glGetShaderInfoLog(shaderID, 1024)) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/ItemTrackerData.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/ItemTrackerData.kt index 5fa12dbb6c74..4b871377bdd3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/ItemTrackerData.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/ItemTrackerData.kt @@ -24,7 +24,7 @@ abstract class ItemTrackerData : TrackerData() { resetItems() } - fun additem(internalName: NEUInternalName, stackSize: Int) { + fun addItem(internalName: NEUInternalName, stackSize: Int) { val item = items.getOrPut(internalName) { TrackedItem() } item.timesGained++ diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt index f7bafb7f3a5c..21f115746d46 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniItemTracker.kt @@ -37,7 +37,7 @@ class SkyHanniItemTracker( fun addItem(internalName: NEUInternalName, amount: Int) { modify { - it.additem(internalName, amount) + it.addItem(internalName, amount) } getSharedTracker()?.let { val hidden = it.get(DisplayMode.TOTAL).items[internalName]!!.hidden From b81896885d37df64ec01d39a9adbb59a269e387c Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:42:04 +0200 Subject: [PATCH 03/44] Improvement + Fix: FF exporting (#2194) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../garden/fortuneguide/CarrolynTable.kt | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CarrolynTable.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CarrolynTable.kt index b7163768b318..c6b6895cffba 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CarrolynTable.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CarrolynTable.kt @@ -10,27 +10,36 @@ enum class CarrolynTable(val crop: CropType, val label: String, completeMessage: CropType.CARROT, "Exportable Carrots", "CARROTS EXPORTATION COMPLETE!", - "[NPC] Carrolyn: Thank you for the carrots." + "[NPC] Carrolyn: Thank you for the carrots.", ), EXPIRED_PUMPKIN( CropType.PUMPKIN, "Expired Pumpkin", "PUMPKINS EXPORTATION COMPLETE!", - "[NPC] Carrolyn: Thank you for the pumpkins." + "[NPC] Carrolyn: Thank you for the pumpkins.", ), SUPREME_CHOCOLATE_BAR( CropType.COCOA_BEANS, "Supreme Chocolate Bar", - "CHOCOLATE BARS EXPORTATION COMPLETE!", - "[NPC] Carrolyn: Thank you for the chocolate." + "COCOA BEANSS EXPORTATION COMPLETE!", + "[NPC] Carrolyn: Thank you for the chocolate.", + ), + FINE_FLOUR( + CropType.WHEAT, + "Fine Flour", + "WHEATS EXPORTATION COMPLETE!", + "[NPC] Carrolyn: Thank you for the flour.", // TODO confirm this, since this is only a estimate ), ; + /** Pattern without colour codes */ val completeMessagePattern by RepoPattern.pattern( - "garden.ff.carrolyn.complete.${crop.patternKeyName}", completeMessage + "garden.ff.carrolyn.complete.${crop.patternKeyName}", completeMessage, ) + + /** Pattern without colour codes */ val thxMessagePattern by RepoPattern.pattern( - "garden.ff.carrolyn.thx.${crop.patternKeyName}", thxMessage + "garden.ff.carrolyn.thx.${crop.patternKeyName}", thxMessage, ) val thxResponse = "§aYou have already given Carrolyn enough $label." From e6021c9ae79af2c34a6dce8f459c0a3205a88ff1 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:42:41 +0200 Subject: [PATCH 04/44] Fix: HypixelData Npe (#2193) --- src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 94b1dc2837ee..dbcf1276047a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -394,7 +394,7 @@ object HypixelData { } } - serverNameConnectionPattern.matchMatcher(mc.getCurrentServerData().serverIP) { + serverNameConnectionPattern.matchMatcher(mc.currentServerData?.serverIP ?: "") { hypixel = true if (group("prefix") == "alpha.") { hypixelAlpha = true From c4b09e50a6e49da34307c3694fc3d76db53c0ac8 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:43:15 +0200 Subject: [PATCH 05/44] Fix: Custom Scoreboard Winter Patterns (#2192) --- .../features/gui/customscoreboard/ScoreboardPattern.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt index b9f80612ec24..11fdfba869c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt @@ -419,11 +419,11 @@ object ScoreboardPattern { ) val winterEventStartPattern by eventsSb.pattern( "wintereventstart", - "(§.)*Event Start: §.\\d+:\\d+$", + "(§.)*Event Start: §.[\\d:]+$", ) val winterNextWavePattern by eventsSb.pattern( "wintereventnextwave", - "(§.)*Next Wave: (§.)*(\\d+:\\d+|Soon!)$", + "(§.)*Next Wave: (§.)*([\\d:]+|Soon!)$", ) val winterWavePattern by eventsSb.pattern( "wintereventwave", @@ -435,11 +435,11 @@ object ScoreboardPattern { ) val winterTotalDmgPattern by eventsSb.pattern( "wintereventtotaldmg", - "(§.)*Your Total Damage: §.\\d+.*$", + "(§.)*Your Total Damage: §.[\\d+,.]+.*$", ) val winterCubeDmgPattern by eventsSb.pattern( "wintereventcubedmg", - "(§.)*Your Cube Damage: §.\\d+$", + "(§.)*Your Cube Damage: §.[\\d+,.]+$", ) // rift From c1f3d47ef4b445e968f0197ff9eaca6f6c362987 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:44:43 +0200 Subject: [PATCH 06/44] Fix: Guild Rank Chat Formatting (#2191) --- .../hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index 1ac35e11593a..b6c0e16f9cca 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -62,7 +62,7 @@ object PlayerChatManager { */ private val guildPattern by patternGroup.pattern( "guild", - "§2Guild > (?.+?)(? §e\\[\\w*])?§f: (?.*)" + "§2Guild > (?.+?) ?(?§e\\[\\w*])?§f: (?.*)", ) /** From 932a24258a254b5fa6f82aae91a50471e99d9962 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:45:21 +0200 Subject: [PATCH 07/44] Backend: Dragon Widget (#2190) --- src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt b/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt index bf2b424d5e7f..9d922f93d60a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt @@ -207,7 +207,7 @@ enum class TabWidget( ), DRAGON( // language=RegExp - "(?:§.)*Dragon: (?:§.)*\\((?[^)])\\)", + "(?:§.)*Dragon: (?:§.)*\\((?[^)]*)\\)", ), VOLCANO( // language=RegExp From c045f391ed6ee70e0a30c8719f606496bf2ab2a0 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:45:37 +0200 Subject: [PATCH 08/44] Backend: ItemCategory Carnival Mask (#2189) --- src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt index e0e17e0644e1..3c0673c648dc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt @@ -32,6 +32,7 @@ enum class ItemCategory { BOOTS, HATCESSORY, ACCESSORY, + CARNIVAL_MASK, POWER_STONE, TRAVEL_SCROLL, REFORGE_STONE, From 30d701c8cceaa532a9b0eee27f458feaf45aa201 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:47:44 +0200 Subject: [PATCH 09/44] Fix: Pet Pattern (#2188) --- src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt index 5b65c8e23cca..75835f054cb4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt @@ -10,15 +10,19 @@ object PetAPI { private val patternGroup = RepoPattern.group("misc.pet") private val petMenuPattern by patternGroup.pattern( "menu.title", - "Pets(?: \\(\\d+/\\d+\\) )?" + "Pets(?: \\(\\d+/\\d+\\) )?", ) + + /** + * REGEX-TEST: §e⭐ §7[Lvl 200] §6Golden Dragon§d ✦ + */ private val petItemName by patternGroup.pattern( "item.name", - "(?:§.)*\\[Lvl (?\\d+)] (?.*)" + "(?§.⭐ )?(?:§.)*\\[Lvl (?\\d+)] (?.*)", ) private val neuRepoPetItemName by patternGroup.pattern( "item.name.neu.format", - "(§f§f)?§7\\[Lvl 1➡(100|200)] (?.*)" + "(?:§f§f)?§7\\[Lvl 1➡(?:100|200)] (?.*)", ) private val ignoredPetStrings = listOf( From df6ff252c99c99aa12790ef72fc5abaa1d4c84c0 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:48:58 +0200 Subject: [PATCH 10/44] Fix: Powder Percentage CW Conflict (#2186) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .idea/dictionaries/default_user.xml | 2 +- src/main/java/at/hannibal2/skyhanni/data/HotmData.kt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.idea/dictionaries/default_user.xml b/.idea/dictionaries/default_user.xml index 64c012a13789..29903e6587fb 100644 --- a/.idea/dictionaries/default_user.xml +++ b/.idea/dictionaries/default_user.xml @@ -273,4 +273,4 @@ yolkar - \ No newline at end of file + diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index f86cc1de82a3..f3a2189b0999 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -409,9 +409,13 @@ enum class HotmData( "Heart of the Mountain", ) + /** + * REGEX-TEST: §5§o§7Level 1§8/50 §7(§b0 §l0%§7):skull: + * REGEX-TEST: §7Level 1§8/50 + */ private val levelPattern by patternGroup.pattern( "perk.level", - "§(?.)Level (?\\d+).*", + "(?:§.)*§(?.)Level (?\\d+).*", ) private val notUnlockedPattern by patternGroup.pattern( @@ -426,7 +430,7 @@ enum class HotmData( private val disabledPattern by patternGroup.pattern( "perk.disabled", "§c§lDISABLED|§7§eClick to select!", - ) // unused for now since the assumption is when enabled isn't found it is disabled, + ) // unused for now since the assumption is when enabled isn't found, it is disabled, // but the value might be useful in the future or for debugging val perkCostPattern by patternGroup.pattern( From af1896b9c322765292a546eefa5d666b3ceb9108 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:50:46 +0200 Subject: [PATCH 11/44] Fix: Scoreboard Votes Pattern (#2184) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/gui/customscoreboard/ScoreboardPattern.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt index 11fdfba869c4..62b282b37cbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt @@ -64,9 +64,14 @@ object ScoreboardPattern { "yearvotes", "(?^§6Year \\d+ Votes\$)", ) + + /** + * REGEX-TEST: §f||||||||||||||| §aFoxy + * REGEX-TEST: §d|§f|||||||||||||| §dDiaz + */ val votesPattern by mainSb.pattern( "votes", - "(?§[caebd]\\|+(§f)?\\|+ §(.+)$)", + "§.\\|+(?:§f)?\\|+ §.+", ) val waitingForVotePattern by mainSb.pattern( "waitingforvote", From 963edde72d6454235068a45c45a2a14d652972ff Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Sat, 6 Jul 2024 02:51:22 -0400 Subject: [PATCH 12/44] Fix: Craftable! Text and Internal Names (#2183) --- .../skyhanni/features/inventory/craft/CraftableItemList.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/craft/CraftableItemList.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/craft/CraftableItemList.kt index 6b841f5a40d0..03e6b6656a2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/craft/CraftableItemList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/craft/CraftableItemList.kt @@ -114,7 +114,7 @@ object CraftableItemList { "§8x$amountFormat ${internalName.itemName}", tips = tooltip, onClick = { - HypixelCommands.viewRecipe(internalName.asString()) + HypixelCommands.viewRecipe(internalName.itemName) }, ) } From 2b9288aa84e5101ad7c8f3867509cb9b3298d775 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:51:45 +0200 Subject: [PATCH 13/44] Fix: Double-Bit in Reforge Helper (#2182) --- src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt index 70f6910c9173..8d70e47ba7ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt @@ -68,7 +68,7 @@ object ReforgeAPI { val rawReforgeStoneName = reforgeStone?.itemNameWithoutColor - val lowercaseName = name.lowercase() + val lowercaseName = name.lowercase().replace('-', '_') fun isValid(itemStack: ItemStack) = isValid(itemStack.getItemCategoryOrNull(), itemStack.getInternalName()) From e6216643e5e85f8912f969a079f0100e3bd5cbf9 Mon Sep 17 00:00:00 2001 From: HiZe Date: Sat, 6 Jul 2024 08:52:20 +0200 Subject: [PATCH 14/44] Fix: Worldedit command (#2179) --- src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt index 01b943959637..9b3cec0a09b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt @@ -125,7 +125,7 @@ object WorldEdit { } "right", "pos2" -> { - leftPos = LocationUtils.playerLocation().toBlockPos() + rightPos = LocationUtils.playerLocation().toBlockPos() ChatUtils.chat("Set right pos.") } From a30e2437c657bbecb8039e783ce4d164b1e08631 Mon Sep 17 00:00:00 2001 From: Obsidian <108832807+Obsidianninja11@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:57:28 -0500 Subject: [PATCH 15/44] Improvement + Fix: Unclaimed Eggs feature while busy (#2091) --- .../config/features/event/HoppityEggsConfig.java | 10 ++++++++-- .../features/event/hoppity/HoppityEggsManager.kt | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java index 0083b1343e5a..de86e01c4cd4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java @@ -93,10 +93,16 @@ public class HoppityEggsConfig { public String warpDestination = "nucleus"; @Expose - @ConfigOption(name = "Show during Contest", desc = "Show during a farming contest.") + @ConfigOption(name = "Show While Busy", desc = "Show while \"busy\" (in a farming contest, doing Kuudra, in the rift, etc).") @ConfigEditorBoolean @FeatureToggle - public boolean showDuringContest = false; + public boolean showWhileBusy = false; + + @Expose + @ConfigOption(name = "Warn While Busy", desc = "Warn while \"busy\" (in a farming contest, doing Kuudra, in the rift, etc).") + @ConfigEditorBoolean + @FeatureToggle + public boolean warnWhileBusy = false; @Expose @ConfigOption(name = "Show Outside SkyBlock", desc = "Show on Hypixel even when not playing SkyBlock.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index bb3753c13d68..de37de625f73 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -199,7 +199,7 @@ object HoppityEggsManager { fun onRenderOverlay(event: GuiRenderEvent) { if (!isActive()) return if (!config.showClaimedEggs) return - if (isBusy()) return + if (isBusy() && !config.showWhileBusy) return val displayList = HoppityEggType.entries.map { "§7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList() @@ -253,7 +253,7 @@ object HoppityEggsManager { private fun warn() { if (!config.warnUnclaimedEggs) return - if (isBusy()) return + if (isBusy() && !config.warnWhileBusy) return if (lastWarnTime.passedSince() < 30.seconds) return lastWarnTime = now() @@ -278,7 +278,7 @@ object HoppityEggsManager { SoundUtils.repeatSound(100, 10, SoundUtils.plingSound) } - private fun isBusy() = ReminderUtils.isBusy(config.showDuringContest) + private fun isBusy() = ReminderUtils.isBusy() @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { @@ -288,6 +288,7 @@ object HoppityEggsManager { "event.chocolateFactory.hoppityEggs.highlightHoppityShop", ) event.move(44, "event.chocolateFactory.hoppityEggs", "event.hoppityEggs") + event.move(50, "event.hoppityEggs.showDuringContest", "event.hoppityEggs.showWhileBusy") } fun isActive() = (LorenzUtils.inSkyBlock || (LorenzUtils.onHypixel && config.showOutsideSkyblock)) && From b2079e539284b34892d24ab4f2411fbe8d920b3e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:03:49 +0200 Subject: [PATCH 16/44] moved hoppity egg display logic into another class --- .../event/hoppity/HoppityEggDisplayManager.kt | 57 +++++++++++++++++++ .../event/hoppity/HoppityEggsManager.kt | 46 +-------------- 2 files changed, 58 insertions(+), 45 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt index 55d6bc01d425..06948f27abff 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt @@ -1,11 +1,18 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.data.mob.MobFilter.isRealPlayer +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.events.render.EntityRenderLayersEvent +import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables +import at.hannibal2.skyhanni.utils.TimeUtils.format +import at.hannibal2.skyhanni.utils.renderables.Renderable import net.minecraft.client.renderer.GlStateManager import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.player.EntityPlayer @@ -18,6 +25,8 @@ object HoppityEggDisplayManager { private val config get() = HoppityEggsManager.config private var shouldHidePlayer: Boolean = false + var display = listOf() + private fun canChangeOpacity(entity: EntityLivingBase): Boolean { if (!HoppityEggLocator.isEnabled()) return false if (entity !is EntityPlayer) return false @@ -55,4 +64,52 @@ object HoppityEggDisplayManager { if (!shouldHidePlayer) return event.cancel() } + + @SubscribeEvent + fun onSecondPassed(event: SecondPassedEvent) { + display = updateDisplay() + } + + private fun updateDisplay(): List { + if (!HoppityEggsManager.isActive()) return emptyList() + if (!HoppityEggsManager.config.showClaimedEggs) return emptyList() + if (ReminderUtils.isBusy() && !HoppityEggsManager.config.showWhileBusy) return emptyList() + + val displayList = + HoppityEggType.entries.map { "§7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList() + displayList.add(0, "§bUnclaimed Eggs:") + + if (HoppityEggsManager.config.showCollectedLocationCount && LorenzUtils.inSkyBlock) { + val totalEggs = HoppityEggLocations.islandLocations.size + if (totalEggs > 0) { + val collectedEggs = HoppityEggLocations.islandCollectedLocations.size + val collectedFormat = formatEggsCollected(collectedEggs) + displayList.add("§7Locations: $collectedFormat$collectedEggs§7/§a$totalEggs") + } + } + if (displayList.size == 1) return emptyList() + + return listOf( + Renderable.clickAndHover( + Renderable.verticalContainer(displayList.map(Renderable::string)), + tips = listOf("§eClick to ${"/warp ${HoppityEggsManager.config.warpDestination}".trim()}!"), + onClick = { HypixelCommands.warp(HoppityEggsManager.config.warpDestination) }, + ), + ) + } + + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent) { + if (!HoppityEggsManager.isActive()) return + HoppityEggsManager.config.position.renderRenderables(display, posLabel = "Hoppity Eggs") + } + + private fun formatEggsCollected(collectedEggs: Int): String = + when (collectedEggs) { + in 0 until 5 -> "§c" + in 5 until 10 -> "§6" + in 10 until 15 -> "§e" + else -> "§a" + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index de37de625f73..8a60516b3e5f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent @@ -16,7 +15,6 @@ import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher -import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.fromNow @@ -25,7 +23,6 @@ import at.hannibal2.skyhanni.utils.SkyBlockTime import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format -import at.hannibal2.skyhanni.utils.renderables.Renderable import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Matcher import kotlin.time.Duration.Companion.seconds @@ -194,45 +191,6 @@ object HoppityEggsManager { } } - // TODO move logic into second passed event and cache - @SubscribeEvent - fun onRenderOverlay(event: GuiRenderEvent) { - if (!isActive()) return - if (!config.showClaimedEggs) return - if (isBusy() && !config.showWhileBusy) return - - val displayList = - HoppityEggType.entries.map { "§7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList() - displayList.add(0, "§bUnclaimed Eggs:") - - if (config.showCollectedLocationCount && LorenzUtils.inSkyBlock) { - val totalEggs = HoppityEggLocations.islandLocations.size - if (totalEggs > 0) { - val collectedEggs = HoppityEggLocations.islandCollectedLocations.size - val collectedFormat = formatEggsCollected(collectedEggs) - displayList.add("§7Locations: $collectedFormat$collectedEggs§7/§a$totalEggs") - } - } - if (displayList.size == 1) return - - val clickableDisplayList = listOf( - Renderable.clickAndHover( - Renderable.verticalContainer(displayList.map(Renderable::string)), - tips = listOf("§eClick to ${"/warp ${config.warpDestination}".trim()}!"), - onClick = { HypixelCommands.warp(config.warpDestination) }, - ), - ) - config.position.renderRenderables(clickableDisplayList, posLabel = "Hoppity Eggs") - } - - private fun formatEggsCollected(collectedEggs: Int): String = - when (collectedEggs) { - in 0 until 5 -> "§c" - in 5 until 10 -> "§6" - in 10 until 15 -> "§e" - else -> "§a" - } - @SubscribeEvent fun onSecondPassed(event: SecondPassedEvent) { if (!isActive()) return @@ -253,7 +211,7 @@ object HoppityEggsManager { private fun warn() { if (!config.warnUnclaimedEggs) return - if (isBusy() && !config.warnWhileBusy) return + if (ReminderUtils.isBusy() && !config.warnWhileBusy) return if (lastWarnTime.passedSince() < 30.seconds) return lastWarnTime = now() @@ -278,8 +236,6 @@ object HoppityEggsManager { SoundUtils.repeatSound(100, 10, SoundUtils.plingSound) } - private fun isBusy() = ReminderUtils.isBusy() - @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move( From 06d4a207346eaf685e8857b7bcc1cfff693b43ac Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:21:26 +0200 Subject: [PATCH 17/44] code cleanup --- .../features/event/hoppity/HoppityEggLocator.kt | 12 +++++------- .../features/event/hoppity/HoppityEggsShared.kt | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt index 893e0f6e5b09..419cd115c805 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt @@ -93,7 +93,7 @@ object HoppityEggLocator { } } - var islandEggsLocations = HoppityEggLocations.islandLocations ?: return + var islandEggsLocations = HoppityEggLocations.islandLocations if (shouldShowAllEggs()) { if (config.hideDuplicateWaypoints) { @@ -145,10 +145,8 @@ object HoppityEggLocator { ) drawDynamicText(it.add(y = 1), "§aGuess", 1.5) } - if (!drawLocations) { - if (config.showLine) { - draw3DLine(eyeLocation, it.add(0.5, 0.5, 0.5), LorenzColor.GREEN.toColor(), 2, false) - } + if (!drawLocations && config.showLine) { + draw3DLine(eyeLocation, it.add(0.5, 0.5, 0.5), LorenzColor.GREEN.toColor(), 2, false) } } } @@ -224,7 +222,7 @@ object HoppityEggLocator { lastGuessMade = SimpleTimeMark.now() possibleEggLocations = emptyList() - val islandEggsLocations = HoppityEggLocations.islandLocations ?: return + val islandEggsLocations = HoppityEggLocations.islandLocations val listSize = validParticleLocations.size if (listSize < 5) return @@ -270,7 +268,7 @@ object HoppityEggLocator { } fun isValidEggLocation(location: LorenzVec): Boolean = - HoppityEggLocations.islandLocations?.any { it.distance(location) < 5.0 } ?: false + HoppityEggLocations.islandLocations.any { it.distance(location) < 5.0 } private fun ReceiveParticleEvent.isVillagerParticle() = type == EnumParticleTypes.VILLAGER_HAPPY && speed == 0.0f && count == 1 diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt index c57150352948..8c32e897924b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt @@ -49,7 +49,7 @@ object HoppityEggsShared { fun shareNearbyEggLocation(playerLocation: LorenzVec, meal: HoppityEggType, note: String) { if (!isEnabled()) return - val islandEggsLocations = HoppityEggLocations.islandLocations ?: return + val islandEggsLocations = HoppityEggLocations.islandLocations val closestEgg = islandEggsLocations.minByOrNull { it.distance(playerLocation) } ?: return val x = closestEgg.x.toInt() From d6358620457236f01ac32e9d5c406c9632b05369 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:27:14 +0200 Subject: [PATCH 18/44] Feature: Line to Nukekebi Skull (#2148) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../config/features/slayer/SlayerConfig.java | 3 +- .../slayer/endermen/EndermanConfig.java | 6 ++ .../slayer/enderman/EndermanSlayerFeatures.kt | 79 ++++++++++++------- 3 files changed, 59 insertions(+), 29 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java index f0b3174f00c6..74f61be7f9a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/SlayerConfig.java @@ -13,8 +13,9 @@ public class SlayerConfig { @Expose - @Category(name = "Endermen", desc = "Endermen Slayer Feature") + @Category(name = "Enderman", desc = "Enderman Slayer Feature") @Accordion + // TODO rename to "enderman" public EndermanConfig endermen = new EndermanConfig(); @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java index a28b7afa8123..1ff8b49d73d9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/slayer/endermen/EndermanConfig.java @@ -18,6 +18,12 @@ public class EndermanConfig { @FeatureToggle public boolean highlightNukekebi = false; + @Expose + @ConfigOption(name = "Line to Nukekubi Skulls", desc = "Draw a line to the Enderman Slayer Nukekubi Skulls.") + @ConfigEditorBoolean + @FeatureToggle + public boolean drawLineToNukekebi = false; + @Expose @ConfigOption(name = "Phase Display", desc = "Show the current phase of the Enderman Slayer in damage indicator.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index c57c473c5fd6..72ab05195e35 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -70,7 +70,7 @@ object EndermanSlayerFeatures { flyingBeacons.add(entity) RenderLivingEntityHelper.setEntityColor( entity, - beaconConfig.beaconColor.toChromaColor().withAlpha(1) + beaconConfig.beaconColor.toChromaColor().withAlpha(1), ) { beaconConfig.highlightBeacon } @@ -85,7 +85,7 @@ object EndermanSlayerFeatures { nukekubiSkulls.add(entity) RenderLivingEntityHelper.setEntityColor( entity, - LorenzColor.GOLD.toColor().withAlpha(1) + LorenzColor.GOLD.toColor().withAlpha(1), ) { config.highlightNukekebi } logger.log("Added Nukekubi skulls at ${entity.getLorenzVec()}") } @@ -102,7 +102,6 @@ object EndermanSlayerFeatures { fun onWorldRender(event: LorenzRenderWorldEvent) { if (!IslandType.THE_END.isInIsland()) return - if (beaconConfig.highlightBeacon) { endermenWithBeacons.removeIf { it.isDead || !hasBeaconInHand(it) } @@ -111,26 +110,39 @@ object EndermanSlayerFeatures { } } - for ((location, time) in sittingBeacon) { - if (location.distanceToPlayer() > 20) continue - if (beaconConfig.showLine) { + drawSittingBeacon(event) + drawFlyingBeacon(event) + drawNukekubiSkulls(event) + } + + private fun drawNukekubiSkulls(event: LorenzRenderWorldEvent) { + for (skull in nukekubiSkulls) { + if (skull.isDead) continue + if (config.highlightNukekebi) { + event.drawDynamicText( + skull.getLorenzVec().add(-0.5, 1.5, -0.5), + "§6Nukekubi Skull", + 1.6, + ignoreBlocks = false, + maxDistance = 20, + ) + } + if (config.drawLineToNukekebi) { + val skullLocation = event.exactLocation(skull) + if (skullLocation.distanceToPlayer() > 20) continue + if (!skullLocation.canBeSeen()) continue event.draw3DLine( event.exactPlayerEyeLocation(), - location.add(0.5, 1.0, 0.5), - beaconConfig.lineColor.toChromaColor(), - beaconConfig.lineWidth, - true + skullLocation.add(y = 1), + LorenzColor.GOLD.toColor(), + 3, + true, ) } - - if (beaconConfig.highlightBeacon) { - val duration = 5.seconds - time.passedSince() - val durationFormat = duration.format(showMilliSeconds = true) - event.drawColor(location, beaconConfig.beaconColor.toChromaColor(), alpha = 1f) - event.drawWaypointFilled(location, beaconConfig.beaconColor.toChromaColor(), true, true) - event.drawDynamicText(location.add(y = 1), "§4Beacon §b$durationFormat", 1.8) - } } + } + + private fun drawFlyingBeacon(event: LorenzRenderWorldEvent) { for (beacon in flyingBeacons) { if (beacon.isDead) continue if (beaconConfig.highlightBeacon) { @@ -145,21 +157,32 @@ object EndermanSlayerFeatures { beaconLocation.add(0.5, 1.0, 0.5), beaconConfig.lineColor.toChromaColor(), beaconConfig.lineWidth, - true + true, ) } } + } - config.highlightNukekebi - for (skull in nukekubiSkulls) { - if (!skull.isDead) { - event.drawDynamicText( - skull.getLorenzVec().add(-0.5, 1.5, -0.5), - "§6Nukekubi Skull", - 1.6, - ignoreBlocks = false + private fun drawSittingBeacon(event: LorenzRenderWorldEvent) { + for ((location, time) in sittingBeacon) { + if (location.distanceToPlayer() > 20) continue + if (beaconConfig.showLine) { + event.draw3DLine( + event.exactPlayerEyeLocation(), + location.add(0.5, 1.0, 0.5), + beaconConfig.lineColor.toChromaColor(), + beaconConfig.lineWidth, + true, ) } + + if (beaconConfig.highlightBeacon) { + val duration = 5.seconds - time.passedSince() + val durationFormat = duration.format(showMilliSeconds = true) + event.drawColor(location, beaconConfig.beaconColor.toChromaColor(), alpha = 1f) + event.drawWaypointFilled(location, beaconConfig.beaconColor.toChromaColor(), true, true) + event.drawDynamicText(location.add(y = 1), "§4Beacon §b$durationFormat", 1.8) + } } } @@ -226,7 +249,7 @@ object EndermanSlayerFeatures { event.move( 3, "slayer.endermanBeaconConfig.highlightBeacon", - "slayer.endermen.endermanBeaconConfig.highlightBeacon" + "slayer.endermen.endermanBeaconConfig.highlightBeacon", ) event.move(3, "slayer.endermanBeaconConfig.beaconColor", "slayer.endermen.endermanBeaconConfig.beaconColor") event.move(3, "slayer.endermanBeaconConfig.showWarning", "slayer.endermen.endermanBeaconConfig.showWarning") From e6b2bcbcdb17f729ead84fd2a2d5d8c0dc6eebc3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:28:43 +0200 Subject: [PATCH 19/44] added debugs --- src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 5edc227dd85a..3a60dd3f4441 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -423,9 +423,13 @@ object ItemUtils { return neededItems } - fun getRecipePrice(recipe: NeuRecipe): Double = - neededItems(recipe).map { + // TODO remove debugs once stack overflow is found + fun getRecipePrice(recipe: NeuRecipe): Double { + println("getRecipePrice ${recipe.title}") + return neededItems(recipe).map { + println("ingredient: ${it.key}") it.key.getPrice() * it.value }.sum() + } } From 4314c0c6fe9fdf46c4aeddfae2c212b2bcfe3a49 Mon Sep 17 00:00:00 2001 From: Xupie <81492239+Xupie@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:40:56 +0300 Subject: [PATCH 20/44] Feature: Armor Stack Display (#1811) Co-authored-by: Xupie <> Co-authored-by: Cal Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../config/features/combat/CombatConfig.java | 5 +++ .../features/combat/StackDisplayConfig.java | 20 +++++++++ .../features/combat/ArmorStackDisplay.kt | 43 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/combat/StackDisplayConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/features/combat/ArmorStackDisplay.kt diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java index 456c3451f82f..b01647609efc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java @@ -24,6 +24,11 @@ public class CombatConfig { @Accordion public QuiverConfig quiverConfig = new QuiverConfig(); + @Expose + @ConfigOption(name = "Armor Stack Display", desc = "") + @Accordion + public StackDisplayConfig stackDisplayConfig = new StackDisplayConfig(); + @Expose @ConfigOption(name = "Summonings", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/StackDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/StackDisplayConfig.java new file mode 100644 index 000000000000..a955fec7a797 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/StackDisplayConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class StackDisplayConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Display the number of stacks on armor pieces like Crimson, Terror, Aurora etc.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigLink(owner = StackDisplayConfig.class, field = "enabled") + public Position position = new Position(480, -210, 1.9f); +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ArmorStackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ArmorStackDisplay.kt new file mode 100644 index 000000000000..942adc20b901 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ArmorStackDisplay.kt @@ -0,0 +1,43 @@ +package at.hannibal2.skyhanni.features.combat + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.ActionBarUpdateEvent +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RegexUtils.findMatcher +import at.hannibal2.skyhanni.utils.RenderUtils.renderString +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +@SkyHanniModule +object ArmorStackDisplay { + private val config get() = SkyHanniMod.feature.combat.stackDisplayConfig + private var display = "" + + /** + * REGEX-TEST: §66,171/4,422❤ §6§l10ᝐ§r §a1,295§a❈ Defense §b525/1,355✎ §3400ʬ + * REGEX-TEST: §66,171/4,422❤ §65ᝐ §b-150 Mana (§6Wither Impact§b) §b1,016/1,355✎ §3400ʬ + */ + private val armorStackPattern by RepoPattern.pattern( + "combat.armorstack.actionbar", + " (?:§6|§6§l)(?\\d+[ᝐ⁑|҉Ѫ⚶])" + ) + + @SubscribeEvent + fun onActionBar(event: ActionBarUpdateEvent) { + if (!isEnabled()) return + val stacks = armorStackPattern.findMatcher(event.actionBar) { + "§6§l" + group("stack") + } ?: "" + display = stacks + } + + @SubscribeEvent + fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { + if (!isEnabled()) return + config.position.renderString(display, posLabel = "Armor Stack Display") + } + + fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled +} From 63c89c9f4b00228362473180ddf91461a340ca1f Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:51:25 +0200 Subject: [PATCH 21/44] Improvement: Estimated Item Value support in Custom Wardrobe (#2080) --- .../features/inventory/wardrobe/CustomWardrobe.kt | 15 +++++++++++++-- .../features/misc/items/EstimatedItemValue.kt | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt index 08abfa34dccc..d12e61d35657 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI.MAX_PAGES import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI.MAX_SLOT_PER_PAGE +import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -41,7 +42,6 @@ import java.awt.Color import kotlin.math.min import kotlin.time.Duration.Companion.milliseconds -// TODO add support for estimated item value @SkyHanniModule object CustomWardrobe { @@ -89,9 +89,16 @@ object CustomWardrobe { loadingPos.renderRenderable(loadingRenderable, posLabel = guiName, addToGuiManager = false) } + GlStateManager.pushMatrix() GlStateManager.translate(0f, 0f, 100f) + pos.renderRenderable(renderable, posLabel = guiName, addToGuiManager = false) - GlStateManager.translate(0f, 0f, -100f) + + if (EstimatedItemValue.config.enabled) { + GlStateManager.translate(0f, 0f, 400f) + EstimatedItemValue.tryRendering() + } + GlStateManager.popMatrix() event.cancel() } @@ -210,9 +217,13 @@ object CustomWardrobe { renderable = Renderable.hoverTips( renderable, tips = toolTip, + stack = stack, condition = { !config.showTooltipOnlyKeybind || config.tooltipKeybind.isKeyHeld() }, + onHover = { + if (EstimatedItemValue.config.enabled) EstimatedItemValue.updateItem(stack) + }, ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt index dee0a6749b73..711b126a5fe6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt @@ -39,7 +39,7 @@ import kotlin.math.roundToLong @SkyHanniModule object EstimatedItemValue { - private val config get() = SkyHanniMod.feature.inventory.estimatedItemValues + val config get() = SkyHanniMod.feature.inventory.estimatedItemValues private var display = emptyList>() private val cache = mutableMapOf>>() private var lastToolTipTime = 0L @@ -86,7 +86,7 @@ object EstimatedItemValue { renderedItems = 0 } - private fun tryRendering() { + fun tryRendering() { currentlyShowing = checkCurrentlyVisible() if (!currentlyShowing) return @@ -129,7 +129,7 @@ object EstimatedItemValue { updateItem(event.stack) } - private fun updateItem(item: ItemStack) { + fun updateItem(item: ItemStack) { cache[item]?.let { display = it lastToolTipTime = System.currentTimeMillis() From 7c488b9741ca089e4419a5cc1ea44bad99ae6cea Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:52:25 +0200 Subject: [PATCH 22/44] resetting estimated item value cache on config update --- .../misc/EstimatedItemValueConfig.java | 12 ++++++------ .../features/misc/items/EstimatedItemValue.kt | 18 ++++++++++++++---- .../misc/items/EstimatedItemValueCalculator.kt | 11 ++++++----- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java index dcbb65d15862..10d97ebfdb0f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/EstimatedItemValueConfig.java @@ -41,7 +41,7 @@ public class EstimatedItemValueConfig { @Expose @ConfigOption(name = "Show Exact Price", desc = "Show the exact total price instead of the compact number.") @ConfigEditorBoolean - public boolean exactPrice = false; + public Property exactPrice = Property.of(false); @Expose @ConfigOption(name = "Show Armor Value", desc = "Show the value of the full armor set in the Wardrobe inventory.") @@ -52,22 +52,22 @@ public class EstimatedItemValueConfig { @Expose @ConfigOption(name = "Ignore Helmet Skins", desc = "Ignore helmet Skins from the total value.") @ConfigEditorBoolean - public boolean ignoreHelmetSkins = false; + public Property ignoreHelmetSkins = Property.of(false); @Expose @ConfigOption(name = "Ignore Armor Dyes", desc = "Ignore Armor Dyes from the total value.") @ConfigEditorBoolean - public boolean ignoreArmorDyes = false; + public Property ignoreArmorDyes = Property.of(false); @Expose @ConfigOption(name = "Ignore Runes", desc = "Ignore Runes from the total value.") @ConfigEditorBoolean - public boolean ignoreRunes = false; + public Property ignoreRunes = Property.of(false); @Expose @ConfigOption(name = "Bazaar Price Source", desc = "Use Instant Buy or Buy Order.") @ConfigEditorDropdown - public BazaarPriceSource bazaarPriceSource = BazaarPriceSource.BUY_ORDER; + public Property bazaarPriceSource = Property.of(BazaarPriceSource.BUY_ORDER); public enum BazaarPriceSource { INSTANT_BUY("Instant Buy"), @@ -92,7 +92,7 @@ public String toString() { "This will drastically decrease the estimated value but might be correct when buying multiple low tier items and combining them." ) @ConfigEditorBoolean - public boolean useAttributeComposite = false; + public Property useAttributeComposite = Property.of(false); @Expose @ConfigLink(owner = EstimatedItemValueConfig.class, field = "enabled") diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt index 711b126a5fe6..21b86b6cffec 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt @@ -15,7 +15,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.ConditionalUtils.onToggle +import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -116,8 +116,18 @@ object EstimatedItemValue { @SubscribeEvent fun onConfigLoad(event: ConfigLoadEvent) { - config.enchantmentsCap.onToggle { - cache.clear() + with(config) { + ConditionalUtils.onToggle( + enchantmentsCap, + exactPrice, + ignoreHelmetSkins, + ignoreArmorDyes, + ignoreRunes, + bazaarPriceSource, + useAttributeComposite, + ) { + cache.clear() + } } } @@ -206,7 +216,7 @@ object EstimatedItemValue { if (basePrice == totalPrice) return listOf() - val numberFormat = if (config.exactPrice) { + val numberFormat = if (config.exactPrice.get()) { totalPrice.roundToLong().addSeparators() } else { totalPrice.shortFormat() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 54f8f675eb55..bfc42659f90f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -51,6 +51,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.hasWoodSingularity import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.isRecombobulated import at.hannibal2.skyhanni.utils.StringUtils.allLettersFirstUppercase import io.github.moulberry.notenoughupdates.recipes.Ingredient +import io.github.notenoughupdates.moulconfig.observer.Property import net.minecraft.item.ItemStack import java.util.Locale @@ -208,7 +209,7 @@ object EstimatedItemValueCalculator { private fun String.fixMending() = if (this == "MENDING") "VITALITY" else this private fun getPriceOrCompositePriceForAttribute(attributeName: String, level: Int): Double? { - val intRange = if (config.useAttributeComposite) 1..10 else level..level + val intRange = if (config.useAttributeComposite.get()) 1..10 else level..level return intRange.mapNotNull { lowerLevel -> "$attributeName;$lowerLevel".asInternalName().getPriceOrNull() ?.let { it / (1 shl lowerLevel) * (1 shl level).toDouble() } @@ -480,18 +481,18 @@ object EstimatedItemValueCalculator { internalName: NEUInternalName, list: MutableList, label: String, - shouldIgnorePrice: Boolean, + shouldIgnorePrice: Property, ): Double { val price = internalName.getPrice() val name = internalName.getNameOrRepoError() val displayName = name ?: "§c${internalName.asString()}" - val color = if (shouldIgnorePrice) "§7" else "§6" + val color = if (shouldIgnorePrice.get()) "§7" else "§6" list.add("§7$label: $displayName §7($color" + price.shortFormat() + "§7)") if (name == null) { list.add(" §8(Not yet in NEU Repo)") } - return if (shouldIgnorePrice) 0.0 else price + return if (shouldIgnorePrice.get()) 0.0 else price } private fun addEnrichment(stack: ItemStack, list: MutableList): Double { @@ -759,7 +760,7 @@ object EstimatedItemValueCalculator { private fun NEUInternalName.getPrice(): Double = getPriceOrNull() ?: -1.0 private fun NEUInternalName.getPriceOrNull(): Double? { - val useSellPrice = config.bazaarPriceSource == EstimatedItemValueConfig.BazaarPriceSource.BUY_ORDER + val useSellPrice = config.bazaarPriceSource.get() == EstimatedItemValueConfig.BazaarPriceSource.BUY_ORDER return getPriceOrNull(useSellPrice) } } From 9562d7a980b4d92d0bc8af8e2bf52cf398349d63 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 13:33:03 +0200 Subject: [PATCH 23/44] fixed stack overflow errors --- .../at/hannibal2/skyhanni/utils/ItemUtils.kt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 3a60dd3f4441..79b57fcf7d6a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -423,13 +423,15 @@ object ItemUtils { return neededItems } - // TODO remove debugs once stack overflow is found - fun getRecipePrice(recipe: NeuRecipe): Double { - println("getRecipePrice ${recipe.title}") - return neededItems(recipe).map { - println("ingredient: ${it.key}") - it.key.getPrice() * it.value + fun getRecipePrice(recipe: NeuRecipe): Double = + neededItems(recipe).map { + // prevents stack overflow errors with ENDERMAN_MONSTER + if (it.key.endsWith("_MONSTER")) { + 0.0 + } else { + it.key.getPrice() * it.value + } }.sum() - } + } From 1ae710a4e6db9ee0ae3d4299e1b5967d72bb4e11 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jul 2024 13:39:31 +0200 Subject: [PATCH 24/44] Version 0.26 Beta 15 --- build.gradle.kts | 2 +- docs/CHANGELOG.md | 30 +++++++++++++++++++ docs/FEATURES.md | 3 ++ .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 91b8f1a97a61..7e8c141bd3ce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.26.Beta.14" +version = "0.26.Beta.15" val gitHash by lazy { val baos = ByteArrayOutputStream() diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 22be128be8c9..a0be0b30c02f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,6 +17,9 @@ + Added In-Water Display. - Stella (https://github.com/hannibal002/SkyHanni/pull/1892) + Useful when using a Prismarine Blade in Stranded Mode. + Added toggle for compacting Garden visitor summary messages. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2026) ++ Add Armor Stack Display. - Xupie (https://github.com/hannibal002/SkyHanni/pull/1811) + + Display the number of stacks on armor pieces like Crimson, Terror etc. ++ Add a line to Nukekebi Skull. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2148) #### Garden Features @@ -166,6 +169,7 @@ + Displays in /ff the fortune from bestiary and armor stats for enchantments and gemstones. - maxime-bodifee (https://github.com/hannibal002/SkyHanni/pull/1861) + Allow clicking on the Craftable! text in the shopping list to open the "view recipe" menu. - DavidArthurCole (https://github.com/hannibal002/SkyHanni/pull/2075) + Rename Mushroom Tier to Mushroom Milestone in Mooshroom Cow Perk. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2159) ++ Add Fine Flour to the /ff menu. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2194) #### Hoppity Event Improvements @@ -185,6 +189,8 @@ + Added Carnival lines to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1995) + Made the unclaimed eggs GUI clickable. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1934) + Improve punctuation in the rabbit barn full/almost full messages. - Luna (https://github.com/hannibal002/SkyHanni/pull/2146) ++ Seperate option for Unclaimed Eggs warning while "Busy". - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2091) + + In the Rift, Kuudra, Dungeons, etc. #### Mining Improvements @@ -225,6 +231,12 @@ + Added Custom Wardrobe Slot Keybinds. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2105) + These function independently of NEU. NEU's keybinds will not work in the Custom Wardrobe. + Added an option to show item tooltips in the Custom Wardrobe only when holding a keybind. - Empa (https://github.com/hannibal002/SkyHanni/pull/2078) ++ Add support for Estimated Item Value to Custom Wardrobe. - Empa (https://github.com/hannibal002/SkyHanni/pull/2080) ++ Update Estimated Item Value calculation. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2180) + + Change attribute prices from composited to the lowest bin, and added an option to use composited prices again. + + Add Toxophilite. + + Add option to choose whether to use Bazaar buy order or instant buy prices. + + Calculating with tier 5 prices for Ferocious Mana, Hardened Mana, Mana Vampire and Strong Mana. #### Fishing Improvements @@ -289,6 +301,7 @@ + Fixed the order of Goblin Eggs in the Powder Tracker. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2138) + Fixed ore event sometimes getting stuck. - Empa (https://github.com/hannibal002/SkyHanni/pull/2115) + Fix incorrect powder costs and powder spent amounts being displayed for some HOTM perks. - Luna (https://github.com/hannibal002/SkyHanni/pull/2145) ++ Fix Powder Percentage Compatibility Issue with ColeWeight. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2186) #### Garden Fixes @@ -306,6 +319,7 @@ + Fixed cake buff in /ff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2034) + Fix an issue where the farming overtake ETA was being displayed as 60 times longer than it actually was. - Evhan_ (https://github.com/hannibal002/SkyHanni/pull/2158) + Fix overflow level up message being sent upon reaching crop milestone 46. - Luna (https://github.com/hannibal002/SkyHanni/pull/2161) ++ Fix Craftable! text not opening the recipe. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2183) #### Chocolate Factory & Hoppity Hunt Fixes @@ -329,6 +343,9 @@ + Fix Time Tower "One charge will give" calculation not accounting for the player having the Mu Rabbit in their collection. - Luna (https://github.com/hannibal002/SkyHanni/pull/2165) + Fix typo in Chocolate Factory custom reminder config. - aphased (https://github.com/hannibal002/SkyHanni/pull/2169) + Fix the warning messages for the rabbit barn being full/almost full being reversed. - Luna (https://github.com/hannibal002/SkyHanni/pull/2146) ++ Allow seeing the unclaimed eggs GUI while "Busy". - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2091) + + In the Rift, Kuudra, Dungeons, etc. ++ Fix detection for supreme chocolate bar completion. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2194) #### Custom Scoreboard Fixes @@ -341,6 +358,9 @@ + Fixed Unknown lines in the Custom Scoreboard. - Empa (https://github.com/hannibal002/SkyHanni/pull/2119) + Fixed broken event start time for upcoming events in the Custom Scoreboard. - Luna (https://github.com/hannibal002/SkyHanni/pull/2113) + Fixed the New Year Event missing in the Custom Scoreboard.. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2122) ++ Fix Custom Scoreboard Error while voting. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2184) ++ Fix Custom Scoreboard Error during the Winter Event. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2192) ++ Fix Custom Scoreboard Error in Kuudra. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2176) #### Dungeon Fixes @@ -390,6 +410,10 @@ + Fixed incorrect stripping of some prefixes from non-Kuudra armor items in the estimated item value calculation. - Luna (https://github.com/hannibal002/SkyHanni/pull/2057) + This broke other items, like Hot Bait. + Fixed a Custom Wardrobe error when retrieving an item price. - j10a1n15, Empa (https://github.com/hannibal002/SkyHanni/pull/2123) ++ Double-Bit now works in reforge helper . - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2182) ++ Fix favorited pets not being detected. - Empa (https://github.com/hannibal002/SkyHanni/pull/2188) ++ Fix wrong item prices in Estimated Item Value when the craft price is higher than the NPC price and the item is soulbound. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2173) + + E.g. for Gillsplash (fishing equipment). #### Combat Fixes @@ -400,6 +424,7 @@ #### Chat Fixes + Fixed stash getting detected as a private message. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/2060) ++ Fix Guild Rank formatting having an extra space. - Empa (https://github.com/hannibal002/SkyHanni/pull/2191) #### Misc Fixes @@ -425,6 +450,8 @@ + Fixed Hypixel detection on non-Hypixel servers. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/2131) + Fix the skill progress ETA XP/hour being doubled. - Evhan_ (https://github.com/hannibal002/SkyHanni/pull/2163) + Fix launchers showing SkyHanni as LibNinePatch. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2147) ++ Fix "/worldedit right" setting the left position. - HiZe (https://github.com/hannibal002/SkyHanni/pull/2179) ++ Fix a bug in the Hypixel detection. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2193) ### Technical Details @@ -521,6 +548,9 @@ + Add SkyblockStats. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1437) + Add ReforgeAPI. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1437) + Switch some stuff from TabListUpdate to TabWidgetUpdate. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1240) ++ Add carnival mask to item category. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2189) ++ Fix pattern for Dragon Widget. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2190) ++ Changed the readme.md file. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2174) ### Removed Features diff --git a/docs/FEATURES.md b/docs/FEATURES.md index d26e272a43e3..ff97aaa77981 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -401,6 +401,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Show a line to the beacon. - hannibal2 + Warning when enderman slayer beacon spawns - dragon99z + Highlight enderman slayer Nukekubi (Skulls) - dragon99z ++ Add a line to Nukekebi Skull. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2148) + Hide the name of the mobs you need to kill in order for the Slayer boss to spawn. Exclude mobs that are damaged, corrupted, runic or semi rare. + Cooldown when the Fire Pillar from the Blaze Slayer will kill you. @@ -1263,6 +1264,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Click on an item to open /recipe. + Option to include items from inside sacks. + Option to include vanilla items. ++ Add Armor Stack Display. - Xupie (https://github.com/hannibal002/SkyHanni/pull/1811) + + Display the number of stacks on armor pieces like Crimson, Terror etc.
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 5548893f9d62..11ec22d5e556 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -42,7 +42,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.26.Beta.14", + version = "0.26.Beta.15", ) class SkyHanniMod { From 6b76ba0b899b4a733955f9f18c8382de7d6b5b87 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:11:24 +0200 Subject: [PATCH 25/44] Internal: Bug Fix Label action (#2197) --- .github/workflows/label-bug-fix.yml | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/label-bug-fix.yml diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml new file mode 100644 index 000000000000..23ca3af815c8 --- /dev/null +++ b/.github/workflows/label-bug-fix.yml @@ -0,0 +1,40 @@ +name: "Bug Fix label" +on: + pull_request: + types: [ opened,edited ] +jobs: + assign-label: + runs-on: ubuntu-latest + steps: + - name: label + env: + TITLE: ${{ github.event.pull_request.title }} + LABEL: Bug Fix - Sooner than Very Soon + uses: actions/github-script@v7 + with: + script: | + if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [process.env.LABEL] + }) + }else{ + const {data} = await github.rest.issues.listLabelsOnIssue({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }) + const filtered = data.filter(label => label.name == process.env.LABEL) + if(filtered.length == 1){ + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: process.env.LABEL + }) + } + } + + From 0cfd7cd8d9c235d96732162580529d36afd33c2e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:21:49 +0200 Subject: [PATCH 26/44] fix label bug fix --- .github/workflows/label-bug-fix.yml | 43 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index 23ca3af815c8..bfef0bd043a9 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -1,7 +1,7 @@ name: "Bug Fix label" on: pull_request: - types: [ opened,edited ] + types: [ opened, edited ] jobs: assign-label: runs-on: ubuntu-latest @@ -10,31 +10,30 @@ jobs: env: TITLE: ${{ github.event.pull_request.title }} LABEL: Bug Fix - Sooner than Very Soon + repoToken: "${{ secrets.GITHUB_TOKEN }}" uses: actions/github-script@v7 with: script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [process.env.LABEL] - }) + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [process.env.LABEL] + }) }else{ - const {data} = await github.rest.issues.listLabelsOnIssue({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, + const {data} = await github.rest.issues.listLabelsOnIssue({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }) + const filtered = data.filter(label => label.name == process.env.LABEL) + if(filtered.length == 1){ + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: process.env.LABEL }) - const filtered = data.filter(label => label.name == process.env.LABEL) - if(filtered.length == 1){ - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: process.env.LABEL - }) - } + } } - - From 2efe94f52aa40b5bdb1f19d6a9c76a5592569fe7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:23:25 +0200 Subject: [PATCH 27/44] fix label bug fix v2 --- .github/workflows/label-bug-fix.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index bfef0bd043a9..fc5d2d154187 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -13,6 +13,7 @@ jobs: repoToken: "${{ secrets.GITHUB_TOKEN }}" uses: actions/github-script@v7 with: + github-token: ${{ env.repoToken }} script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ github.rest.issues.addLabels({ From a9530b57b4223efbf79423d2cd918e9fb4b91f39 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:24:49 +0200 Subject: [PATCH 28/44] fix label bug fix v3 --- .github/workflows/label-bug-fix.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index fc5d2d154187..fdee44e0894e 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -10,10 +10,9 @@ jobs: env: TITLE: ${{ github.event.pull_request.title }} LABEL: Bug Fix - Sooner than Very Soon - repoToken: "${{ secrets.GITHUB_TOKEN }}" uses: actions/github-script@v7 with: - github-token: ${{ env.repoToken }} + github-token: ${{ secrets.MY_PAT }} script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ github.rest.issues.addLabels({ From 71bd53c97feb2b5a3278dea5dcffcbf949c70df6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:27:25 +0200 Subject: [PATCH 29/44] fix label bug fix v4 --- .github/workflows/label-bug-fix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index fdee44e0894e..e7cce8853b88 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -12,7 +12,7 @@ jobs: LABEL: Bug Fix - Sooner than Very Soon uses: actions/github-script@v7 with: - github-token: ${{ secrets.MY_PAT }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ github.rest.issues.addLabels({ From 74e19f106e5e4e975fbed25b676c52eec9de1cb9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:28:33 +0200 Subject: [PATCH 30/44] fix label bug fix v5 --- .github/workflows/label-bug-fix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index e7cce8853b88..20c3aec4f3d5 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -12,7 +12,7 @@ jobs: LABEL: Bug Fix - Sooner than Very Soon uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + repoToken: "${{ secrets.GITHUB_TOKEN }}" script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ github.rest.issues.addLabels({ From 213baa31db08c82be7fb6f4ef7241cc9bbcf79a4 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:40:15 +0200 Subject: [PATCH 31/44] fix label bug fix v6 --- .github/workflows/label-bug-fix.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index 20c3aec4f3d5..f25633f754c6 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -1,7 +1,11 @@ name: "Bug Fix label" on: pull_request: - types: [ opened, edited ] + types: [ opened, edited, labeled ] + +permissions: + issues: write + jobs: assign-label: runs-on: ubuntu-latest @@ -12,7 +16,7 @@ jobs: LABEL: Bug Fix - Sooner than Very Soon uses: actions/github-script@v7 with: - repoToken: "${{ secrets.GITHUB_TOKEN }}" + github-token: "${{ secrets.GITHUB_TOKEN }}" script: | if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ github.rest.issues.addLabels({ From f945c8f37cb1a5fa2e307edf5496f67dc1b8416d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:44:56 +0200 Subject: [PATCH 32/44] fix label bug fix v7 --- .github/workflows/label-bug-fix.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index f25633f754c6..f27fd8cf759b 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -3,8 +3,10 @@ on: pull_request: types: [ opened, edited, labeled ] + permissions: - issues: write + contents: read + pull-requests: write jobs: assign-label: From 061652b30c5cde5305e852958886131ef0831559 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:46:27 +0200 Subject: [PATCH 33/44] fix label bug fix v8 --- .github/workflows/label-bug-fix.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index f27fd8cf759b..c66acb5ff7e2 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -4,13 +4,13 @@ on: types: [ opened, edited, labeled ] -permissions: - contents: read - pull-requests: write jobs: assign-label: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: label env: From 7ef7178b1f4c9523137cfa9ed90f5883ee6449b5 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:47:25 +0200 Subject: [PATCH 34/44] fix label bug fix v9 --- .github/workflows/label-bug-fix.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml index c66acb5ff7e2..71e00d27be83 100644 --- a/.github/workflows/label-bug-fix.yml +++ b/.github/workflows/label-bug-fix.yml @@ -3,14 +3,11 @@ on: pull_request: types: [ opened, edited, labeled ] - - jobs: assign-label: runs-on: ubuntu-latest permissions: - contents: read - pull-requests: write + issues: write steps: - name: label env: From 605d4c676fb126573e3267c6d45d3aee1860ba6d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:48:42 +0200 Subject: [PATCH 35/44] remove label bug fix for now --- .github/workflows/label-bug-fix.yml | 42 ----------------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/label-bug-fix.yml diff --git a/.github/workflows/label-bug-fix.yml b/.github/workflows/label-bug-fix.yml deleted file mode 100644 index 71e00d27be83..000000000000 --- a/.github/workflows/label-bug-fix.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "Bug Fix label" -on: - pull_request: - types: [ opened, edited, labeled ] - -jobs: - assign-label: - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: label - env: - TITLE: ${{ github.event.pull_request.title }} - LABEL: Bug Fix - Sooner than Very Soon - uses: actions/github-script@v7 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - script: | - if(process.env.TITLE.split(":")[0].toUpperCase().includes("FIX")){ - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [process.env.LABEL] - }) - }else{ - const {data} = await github.rest.issues.listLabelsOnIssue({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - }) - const filtered = data.filter(label => label.name == process.env.LABEL) - if(filtered.length == 1){ - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: process.env.LABEL - }) - } - } From bcbdf74c9563c555c767dc6ef26558152810e645 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:24:26 +0200 Subject: [PATCH 36/44] Fix: Stackoverflow for getPrice (#2199) --- .../java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 10 ++-------- .../java/at/hannibal2/skyhanni/utils/NEUItems.kt | 15 +++++++++------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 79b57fcf7d6a..b662e10d434c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -423,15 +423,9 @@ object ItemUtils { return neededItems } - fun getRecipePrice(recipe: NeuRecipe): Double = + fun getRecipePrice(recipe: NeuRecipe, pastRecipes: List = emptyList()): Double = neededItems(recipe).map { - // prevents stack overflow errors with ENDERMAN_MONSTER - if (it.key.endsWith("_MONSTER")) { - 0.0 - } else { - it.key.getPrice() * it.value - } + it.key.getPrice(pastRecipes = pastRecipes) * it.value }.sum() - } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 75d394631fd8..3fc54009e739 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -160,7 +160,8 @@ object NEUItems { fun getInternalNameOrNull(nbt: NBTTagCompound): NEUInternalName? = ItemResolutionQuery(manager).withItemNBT(nbt).resolveInternalName()?.asInternalName() - fun NEUInternalName.getPrice(useSellPrice: Boolean = false) = getPriceOrNull(useSellPrice) ?: -1.0 + fun NEUInternalName.getPrice(useSellPrice: Boolean = false, pastRecipes: List = emptyList()) = + getPriceOrNull(useSellPrice, pastRecipes) ?: -1.0 fun NEUInternalName.getNpcPrice() = getNpcPriceOrNull() ?: -1.0 @@ -174,7 +175,7 @@ object NEUItems { fun transHypixelNameToInternalName(hypixelId: String): NEUInternalName = manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).asInternalName() - fun NEUInternalName.getPriceOrNull(useSellPrice: Boolean = false): Double? { + fun NEUInternalName.getPriceOrNull(useSellPrice: Boolean = false, pastRecipes: List = emptyList()): Double? { if (this == NEUInternalName.WISP_POTION) { return 20_000.0 } @@ -194,13 +195,15 @@ object NEUItems { return 7.0 // NPC price } - return getNpcPriceOrNull() ?: getRawCraftCostOrNull() + return getNpcPriceOrNull() ?: getRawCraftCostOrNull(pastRecipes) } // If NEU fails to calculate the craft costs, we calculate it ourself. - fun NEUInternalName.getRawCraftCostOrNull(): Double? = manager.auctionManager.getCraftCost(asString())?.craftCost ?: run { - getRecipes(this).map { ItemUtils.getRecipePrice(it) }.minOrNull() - } + fun NEUInternalName.getRawCraftCostOrNull(pastRecipes: List = emptyList()): Double? = + manager.auctionManager.getCraftCost(asString())?.craftCost ?: run { + getRecipes(this).filter { it !in pastRecipes } + .map { ItemUtils.getRecipePrice(it, pastRecipes + it) }.minOrNull() + } fun NEUInternalName.getItemStackOrNull(): ItemStack? = ItemResolutionQuery(manager) .withKnownInternalName(asString()) From 63fe8d8986954ab8c274018e069957886503e5e6 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:25:13 +0200 Subject: [PATCH 37/44] Fix: Wardrobe Keybinds (#2198) --- src/main/java/at/hannibal2/skyhanni/data/GuiData.kt | 6 +++--- .../features/inventory/wardrobe/CustomWardrobeKeybinds.kt | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt index a96574a2b53d..38ac99d1b3f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt @@ -39,9 +39,9 @@ object GuiData { if (preDrawEventCancelled) event.isCanceled = true } - @SubscribeEvent(priority = EventPriority.HIGH) + @SubscribeEvent(priority = EventPriority.HIGHEST) fun onGuiKeyPress(event: GuiScreenEvent.KeyboardInputEvent.Pre) { - val keys = Minecraft.getMinecraft().gameSettings.let { + val allowedKeys = Minecraft.getMinecraft().gameSettings.let { listOf( Keyboard.KEY_ESCAPE, it.keyBindInventory.keyCode, @@ -49,7 +49,7 @@ object GuiData { it.keyBindFullscreen.keyCode, ) } - if (keys.any { it.isKeyHeld() }) return + if (allowedKeys.any { it.isKeyHeld() }) return if (CustomWardrobeKeybinds.allowKeyboardClick()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt index 2e3716cb2554..502255afae93 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobeKeybinds.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobe.clickSlot import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyClicked +import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -33,8 +34,8 @@ object CustomWardrobeKeybinds { if (!isEnabled()) return val slots = WardrobeAPI.slots.filter { it.isInCurrentPage() } - for ((key, index) in keybinds.withIndex().map { it.value to it.index }) { - if (!key.isKeyClicked()) continue + for ((index, key) in keybinds.withIndex()) { + if (!key.isKeyHeld()) continue if (lastClick.passedSince() < 200.milliseconds) break val slot = slots.getOrNull(index) ?: continue From 4c300de2cf0a33a737a4c4a8291d61bb99fc1074 Mon Sep 17 00:00:00 2001 From: Stella Date: Sun, 7 Jul 2024 02:26:23 -0700 Subject: [PATCH 38/44] Fix: Adds new mayor perks to scoreboard (#2187) --- .../java/at/hannibal2/skyhanni/data/Mayors.kt | 113 +++++++++++++++--- 1 file changed, 94 insertions(+), 19 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt b/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt index 7ff74aeda43e..b2ac98b3289f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt @@ -11,26 +11,92 @@ enum class Mayor( val color: String, vararg val perks: Perk, ) { - AATROX("Aatrox", "§3", Perk.SLASHED_PRICING, Perk.SLAYER_XP_BUFF, Perk.PATHFINDER), - COLE("Cole", "§e", Perk.PROSPECTION, Perk.MINING_XP_BUFF, Perk.MINING_FIESTA), - DIANA("Diana", "§2", Perk.LUCKY, Perk.MYTHOLOGICAL_RITUAL, Perk.PET_XP_BUFF), - DIAZ("Diaz", "§6", Perk.BARRIER_STREET, Perk.SHOPPING_SPREE), - FINNEGAN("Finnegan", "§c", Perk.FARMING_SIMULATOR, Perk.PELT_POCALYPSE, Perk.GOATED), + AATROX( + "Aatrox", + "§3", + Perk.SLASHED_PRICING, + Perk.SLAYER_XP_BUFF, + Perk.PATHFINDER + ), + COLE( + "Cole", + "§e", + Perk.PROSPECTION, + Perk.MINING_XP_BUFF, + Perk.MINING_FIESTA, + Perk.MOLTEN_FORGE + ), + DIANA( + "Diana", + "§2", + Perk.LUCKY, + Perk.MYTHOLOGICAL_RITUAL, + Perk.PET_XP_BUFF, + Perk.SHARING_IS_CARING + ), + DIAZ( + "Diaz", + "§6", + Perk.VOLUME_TRADING, + Perk.SHOPPING_SPREE, + Perk.STOCK_EXCHANGE, + Perk.LONG_TERM_INVESTMENT + ), + FINNEGAN( + "Finnegan", + "§c", + Perk.FARMING_SIMULATOR, + Perk.PELT_POCALYPSE, + Perk.GOATED, + Perk.BLOOMING_BUSINESS + ), FOXY( "Foxy", "§d", - Perk.SWEET_TOOTH, - Perk.BENEVOLENCE, + Perk.SWEET_BENEVOLENCE, + Perk.A_TIME_FOR_GIVING, + Perk.CHIVALROUS_CARNIVAL, Perk.EXTRA_EVENT_MINING, Perk.EXTRA_EVENT_FISHING, - Perk.EXTRA_EVENT_SPOOKY + Perk.EXTRA_EVENT_SPOOKY, + ), + MARINA( + "Marina", + "§b", + Perk.FISHING_XP_BUFF, + Perk.LUCK_OF_THE_SEA, + Perk.FISHING_FESTIVAL, + Perk.DOUBLE_TROUBLE + ), + PAUL( + "Paul", + "§c", + Perk.MARAUDER, + Perk.EZPZ, + Perk.BENEDICTION ), - MARINA("Marina", "§b", Perk.FISHING_XP_BUFF, Perk.LUCK_OF_THE_SEA, Perk.FISHING_FESTIVAL), - PAUL("Paul", "§c", Perk.MARAUDER, Perk.EZPZ, Perk.BENEDICTION), - SCORPIUS("Scorpius", "§d", Perk.BRIBE, Perk.DARKER_AUCTIONS), - JERRY("Jerry", "§d", Perk.PERKPOCALYPSE, Perk.STATSPOCALYPSE, Perk.JERRYPOCALYPSE), - DERPY("Derpy", "§d", Perk.TURBO_MINIONS, Perk.AH_CLOSED, Perk.DOUBLE_MOBS_HP, Perk.MOAR_SKILLZ), + SCORPIUS( + "Scorpius", + "§d", + Perk.BRIBE, + Perk.DARKER_AUCTIONS + ), + JERRY( + "Jerry", + "§d", + Perk.PERKPOCALYPSE, + Perk.STATSPOCALYPSE, + Perk.JERRYPOCALYPSE + ), + DERPY( + "Derpy", + "§d", + Perk.TURBO_MINIONS, + Perk.AH_TAX, + Perk.DOUBLE_MOBS_HP, + Perk.MOAR_SKILLZ + ), UNKNOWN("Unknown", "§c"), DISABLED("§cDisabled", "§7"), @@ -62,7 +128,7 @@ enum class Mayor( "mayor name not in Mayor enum", "name" to name, "perksJson" to perksJson, - betaOnly = true + betaOnly = true, ) return null } @@ -87,7 +153,7 @@ enum class Mayor( val foxyExtraEventPairs = mapOf( "Spooky Festival" to "Extra Event (Spooky)", "Mining Fiesta" to "Extra Event (Mining)", - "Fishing Festival" to "Extra Event (Fishing)" + "Fishing Festival" to "Extra Event (Fishing)", ) foxyExtraEventPattern.matchMatcher(this.description) { @@ -108,24 +174,30 @@ enum class Perk(val perkName: String) { PROSPECTION("Prospection"), MINING_XP_BUFF("Mining XP Buff"), MINING_FIESTA("Mining Fiesta"), + MOLTEN_FORGE("Molten Forge"), // Diana LUCKY("Lucky!"), MYTHOLOGICAL_RITUAL("Mythological Ritual"), PET_XP_BUFF("Pet XP Buff"), + SHARING_IS_CARING("Sharing is Caring"), // Diaz - BARRIER_STREET("Barrier Street"), SHOPPING_SPREE("Shopping Spree"), + VOLUME_TRADING("Volume Trading"), + STOCK_EXCHANGE("Stock Exchange"), + LONG_TERM_INVESTMENT("Long Term Investment"), // Finnegan FARMING_SIMULATOR("Farming Simulator"), PELT_POCALYPSE("Pelt-pocalypse"), GOATED("GOATed"), + BLOOMING_BUSINESS("Blooming Business"), // Foxy - SWEET_TOOTH("Sweet Tooth"), - BENEVOLENCE("Benevolence"), + SWEET_BENEVOLENCE("Sweet Benevolence"), + A_TIME_FOR_GIVING("A Time for Giving"), + CHIVALROUS_CARNIVAL("Chivalrous Carnival"), EXTRA_EVENT_MINING("Extra Event (Mining)"), EXTRA_EVENT_FISHING("Extra Event (Fishing)"), EXTRA_EVENT_SPOOKY("Extra Event (Spooky)"), @@ -134,6 +206,7 @@ enum class Perk(val perkName: String) { FISHING_XP_BUFF("Fishing XP Buff"), LUCK_OF_THE_SEA("Luck of the Sea 2.0"), FISHING_FESTIVAL("Fishing Festival"), + DOUBLE_TROUBLE("Double Trouble"), // Paul MARAUDER("Marauder"), @@ -151,7 +224,9 @@ enum class Perk(val perkName: String) { // Derpy TURBO_MINIONS("TURBO MINIONS!!!"), - AH_CLOSED("AH CLOSED!!!"), + AH_TAX("MOAR TAX!!!"), + + // I don't know what the perk is actually gonna be named DOUBLE_MOBS_HP("DOUBLE MOBS HP!!!"), MOAR_SKILLZ("MOAR SKILLZ!!!"), ; From 3d691842dd3a937369725a87bcf5d91546168491 Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Sun, 7 Jul 2024 05:28:16 -0400 Subject: [PATCH 39/44] Improvement: Add Config option for Time Tower in "Best Upgrade" (#2142) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../ChocolateUpgradeWarningsConfig.java | 6 +++++ .../storage/ProfileSpecificStorage.java | 1 + .../ChocolateFactoryDataLoader.kt | 23 ++++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateUpgradeWarningsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateUpgradeWarningsConfig.java index 113ac73623c1..6b39f7f49107 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateUpgradeWarningsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateUpgradeWarningsConfig.java @@ -5,6 +5,7 @@ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; public class ChocolateUpgradeWarningsConfig { @Expose @@ -26,4 +27,9 @@ public class ChocolateUpgradeWarningsConfig { ) @ConfigEditorSlider(minValue = 0, maxValue = 10, minStep = 0.25f) public float timeBetweenWarnings = 1; + + @Expose + @ConfigOption(name = "Include Time Tower", desc = "Include Time Tower in the list of upgrades to be considered 'next best'.") + @ConfigEditorBoolean + public Property upgradeWarningTimeTower = Property.of(false); } diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java index 8cd2c6e3b3e3..b49a9c612fca 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java @@ -28,6 +28,7 @@ import at.hannibal2.skyhanni.features.garden.pests.PestProfitTracker; import at.hannibal2.skyhanni.features.garden.pests.VinylType; import at.hannibal2.skyhanni.features.garden.visitor.VisitorReward; +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryUpgrade; import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI; import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay; import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTracker; diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt index 28447b1df980..5dd8a52d38c7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt @@ -7,7 +7,9 @@ import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI.specialRabbitTextures import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ConditionalUtils +import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture @@ -148,6 +150,18 @@ object ChocolateFactoryDataLoader { ConditionalUtils.onToggle(soundProperty) { ChocolateFactoryAPI.warningSound = SoundUtils.createSound(soundProperty.get(), 1f) } + + config.chocolateUpgradeWarnings.upgradeWarningTimeTower.whenChanged { _, _ -> + ChocolateFactoryAPI.factoryUpgrades.takeIf { it.isNotEmpty() }?.let { + findBestUpgrades(it) + } ?: run { + ChatUtils.clickableChat( + "Could not determine your current statistics to get next upgrade. Open CF to fix this!", + onClick = { HypixelCommands.chocolateFactory() }, + "§eClick to run /cf!" + ) + } + } } private fun clearData() { @@ -427,9 +441,12 @@ object ChocolateFactoryDataLoader { private fun findBestUpgrades(list: List) { val profileStorage = profileStorage ?: return - // removing time tower here as people like to determine when to buy it themselves - val notMaxed = list.filter { - !it.isMaxed && it.slotIndex != ChocolateFactoryAPI.timeTowerIndex && it.effectiveCost != null + val ttFiltered = list.filter { + config.chocolateUpgradeWarnings.upgradeWarningTimeTower.get() || it.slotIndex != ChocolateFactoryAPI.timeTowerIndex + } + + val notMaxed = ttFiltered.filter { + !it.isMaxed && it.effectiveCost != null } val bestUpgrade = notMaxed.minByOrNull { it.effectiveCost ?: Double.MAX_VALUE } From fee966a6da7be441d54f76566fe8ba517fc9b4cb Mon Sep 17 00:00:00 2001 From: sayomaki Date: Sun, 7 Jul 2024 17:30:05 +0800 Subject: [PATCH 40/44] Backend: Move hoppity rabbit chat patterns to eggs manager (#2144) --- .../features/event/hoppity/HoppityEggsManager.kt | 6 ++++++ .../chocolatefactory/ChocolateFactoryBarnManager.kt | 13 ++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 8a60516b3e5f..37679bdbfe17 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -70,6 +70,12 @@ object HoppityEggsManager { "rabbit.found.new", "§d§lNEW RABBIT! (?:((§6\\+(?.*) Chocolate §7and )?§6\\+(?.*)x Chocolate §7per second!)|(?.*))", ) + + val duplicateRabbitFound by ChocolateFactoryAPI.patternGroup.pattern( + "rabbit.duplicate", + "§7§lDUPLICATE RABBIT! §6\\+(?[\\d,]+) Chocolate" + ) + private val noEggsLeftPattern by ChocolateFactoryAPI.patternGroup.pattern( "egg.noneleft", "§cThere are no hidden Chocolate Rabbit Eggs nearby! Try again later!", diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt index 62a156ca8d52..82cd173393ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt @@ -23,15 +23,6 @@ object ChocolateFactoryBarnManager { private val hoppityConfig get() = HoppityEggsManager.config private val profileStorage get() = ChocolateFactoryAPI.profileStorage - private val newRabbitPattern by ChocolateFactoryAPI.patternGroup.pattern( - "rabbit.new", - "§d§lNEW RABBIT! §6\\+\\d+ Chocolate §7and §6\\+0.\\d+x Chocolate §7per second!" - ) - private val rabbitDuplicatePattern by ChocolateFactoryAPI.patternGroup.pattern( - "rabbit.duplicate", - "§7§lDUPLICATE RABBIT! §6\\+(?[\\d,]+) Chocolate" - ) - /** * REGEX-TEST: §c§lBARN FULL! §fOlivette §7got §ccrushed§7! §6+290,241 Chocolate */ @@ -47,14 +38,14 @@ object ChocolateFactoryBarnManager { fun onChat(event: LorenzChatEvent) { if (!LorenzUtils.inSkyBlock) return - newRabbitPattern.matchMatcher(event.message) { + HoppityEggsManager.newRabbitFound.matchMatcher(event.message) { val profileStorage = profileStorage ?: return profileStorage.currentRabbits += 1 trySendBarnFullMessage() HoppityEggsManager.shareWaypointPrompt() } - rabbitDuplicatePattern.matchMatcher(event.message) { + HoppityEggsManager.duplicateRabbitFound.matchMatcher(event.message) { HoppityEggsManager.shareWaypointPrompt() val amount = group("amount").formatLong() if (config.showDuplicateTime && !hoppityConfig.compactChat) { From c4b42412d844bb943144fd17f3a4d134c8ed5eea Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:35:03 +0200 Subject: [PATCH 41/44] Backend: Fix RepoPattern localeLoading (#2069) --- .../skyhanni/utils/repopatterns/RepoPatternManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index 8d26cf46afc5..0bbcda9cfe94 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -78,7 +78,7 @@ object RepoPatternManager { } } - val localLoading: Boolean get() = config.forceLocal.get() || (!insideTest && PlatformUtils.isDevEnvironment) + val localLoading: Boolean get() = config.forceLocal.get() xor (!insideTest && PlatformUtils.isDevEnvironment) private val logger = LogManager.getLogger("SkyHanni") @@ -309,7 +309,7 @@ object RepoPatternManager { * @return returns any pattern on the [prefix] key space (including list or any other complex structure, but as a simple pattern * */ internal fun getUnusedPatterns(prefix: String): List { - if (config.forceLocal.get()) return emptyList() + if (localLoading) return emptyList() try { verifyKeyShape(prefix) } catch (e: IllegalArgumentException) { From 6b3e2d7b0cf478deb2d8f5876a402c01508a5d43 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:39:05 +0200 Subject: [PATCH 42/44] Backend: Mobdetection First Seen Event (#2096) --- .../at/hannibal2/skyhanni/data/mob/MobData.kt | 9 +++++++++ .../hannibal2/skyhanni/data/mob/MobDetection.kt | 17 +++++++++++++++-- .../at/hannibal2/skyhanni/events/MobEvent.kt | 9 +++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt index 4eb79d6de971..f955384c5f4e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt @@ -28,6 +28,8 @@ object MobData { val entityToMob = mutableMapOf() + internal val notSeenMobs = MobSet() + internal val currentEntityLiving = mutableSetOf() internal val previousEntityLiving = mutableSetOf() @@ -91,12 +93,19 @@ object MobData { fun onMobEventSpawn(event: MobEvent.Spawn) { entityToMob.putAll(event.mob.makeEntityToMobAssociation()) currentMobs.add(event.mob) + notSeenMobs.add(event.mob) } @SubscribeEvent fun onMobEventDeSpawn(event: MobEvent.DeSpawn) { event.mob.fullEntityList().forEach { entityToMob.remove(it) } currentMobs.remove(event.mob) + notSeenMobs.remove(event.mob) + } + + @SubscribeEvent + fun onMobFirstSeen(event: MobEvent.FirstSeen) { + notSeenMobs.remove(event.mob) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt index 82aec2fc6bcc..b7cc4dfaa13a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt @@ -35,7 +35,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.atomic.AtomicBoolean - @SkyHanniModule object MobDetection { @@ -72,7 +71,6 @@ object MobDetection { shouldClear.set(false) } if (!LorenzUtils.inSkyBlock) return - if (event.isMod(2)) return makeEntityReferenceUpdate() @@ -95,6 +93,8 @@ object MobDetection { (MobData.currentEntityLiving - MobData.previousEntityLiving).forEach { addRetry(it) } // Spawn (MobData.previousEntityLiving - MobData.currentEntityLiving).forEach { entityDeSpawn(it) } // Despawn + MobData.notSeenMobs.removeIf(::canBeSeen) + if (forceReset) { mobDetectionReset() // Ensure that all mobs are cleared 100% } @@ -120,6 +120,19 @@ object MobDetection { /** @return always true */ private fun mobDetectionError(string: String) = MobData.logger.log(string).let { true } + private fun canBeSeen(mob: Mob): Boolean { + val isVisible = !mob.isInvisible() && mob.canBeSeen() + if (isVisible) when (mob.mobType) { + Mob.Type.PLAYER -> MobEvent.FirstSeen.Player(mob) + Mob.Type.SUMMON -> MobEvent.FirstSeen.Summon(mob) + Mob.Type.SPECIAL -> MobEvent.FirstSeen.Special(mob) + Mob.Type.PROJECTILE -> MobEvent.FirstSeen.Projectile(mob) + Mob.Type.DISPLAY_NPC -> MobEvent.FirstSeen.DisplayNPC(mob) + Mob.Type.BASIC, Mob.Type.DUNGEON, Mob.Type.BOSS, Mob.Type.SLAYER -> MobEvent.FirstSeen.SkyblockMob(mob) + } + return isVisible + } + /**@return a false means that it should try again (later)*/ private fun entitySpawn(entity: EntityLivingBase, roughType: Mob.Type): Boolean { when (roughType) { diff --git a/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt index 34725c5460d4..07990ff222c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt @@ -20,4 +20,13 @@ open class MobEvent(val mob: Mob) : LorenzEvent() { class Special(mob: Mob) : DeSpawn(mob) class Projectile(mob: Mob) : DeSpawn(mob) } + + open class FirstSeen(mob: Mob) : MobEvent(mob) { + class SkyblockMob(mob: Mob) : FirstSeen(mob) + class Summon(mob: Mob) : FirstSeen(mob) + class Player(mob: Mob) : FirstSeen(mob) + class DisplayNPC(mob: Mob) : FirstSeen(mob) + class Special(mob: Mob) : FirstSeen(mob) + class Projectile(mob: Mob) : FirstSeen(mob) + } } From 6c1c000ba4a27e30a4c141b9988b5204d1ccad2f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:44:37 +0200 Subject: [PATCH 43/44] Hoppity and Chocolate being less annoying (#2196) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../event/hoppity/HoppityEggsManager.kt | 3 ++- .../features/event/hoppity/HoppityNpc.kt | 4 ++-- .../ChocolateFactoryBarnManager.kt | 21 ++++++++++++------- .../ChocolateFactoryDataLoader.kt | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 37679bdbfe17..5e51a7693a37 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -25,6 +25,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Matcher +import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -218,7 +219,7 @@ object HoppityEggsManager { private fun warn() { if (!config.warnUnclaimedEggs) return if (ReminderUtils.isBusy() && !config.warnWhileBusy) return - if (lastWarnTime.passedSince() < 30.seconds) return + if (lastWarnTime.passedSince() < 1.minutes) return lastWarnTime = now() val amount = HoppityEggType.entries.size diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt index 2ec98ccf673b..877e161ef64f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt @@ -18,7 +18,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SkyBlockTime import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds +import kotlin.time.Duration.Companion.minutes @SkyHanniModule object HoppityNpc { @@ -51,7 +51,7 @@ object HoppityNpc { if (ReminderUtils.isBusy()) return if (hoppityYearOpened == SkyBlockTime.now().year) return if (!ChocolateFactoryAPI.isHoppityEvent()) return - if (lastReminderSent.passedSince() <= 30.seconds) return + if (lastReminderSent.passedSince() <= 2.minutes) return ChatUtils.clickableChat( "New rabbits are available at §aHoppity's Shop§e! §c(Click to disable this reminder)", diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt index 82cd173393ac..31762ab2eb91 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory +import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsCompactChat import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager @@ -10,11 +11,9 @@ import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.formatLong import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher -import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.TimeUtils.format import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import kotlin.time.Duration.Companion.seconds @SkyHanniModule object ChocolateFactoryBarnManager { @@ -28,11 +27,11 @@ object ChocolateFactoryBarnManager { */ private val rabbitCrashedPattern by ChocolateFactoryAPI.patternGroup.pattern( "rabbit.crushed", - "§c§lBARN FULL! §f\\D+ §7got §ccrushed§7! §6\\+(?[\\d,]+) Chocolate" + "§c§lBARN FULL! §f\\D+ §7got §ccrushed§7! §6\\+(?[\\d,]+) Chocolate", ) var barnFull = false - private var lastBarnFullWarning = SimpleTimeMark.farPast() + private var sentBarnFullWarning = false @SubscribeEvent fun onChat(event: LorenzChatEvent) { @@ -41,7 +40,7 @@ object ChocolateFactoryBarnManager { HoppityEggsManager.newRabbitFound.matchMatcher(event.message) { val profileStorage = profileStorage ?: return profileStorage.currentRabbits += 1 - trySendBarnFullMessage() + trySendBarnFullMessage(inventory = false) HoppityEggsManager.shareWaypointPrompt() } @@ -64,7 +63,12 @@ object ChocolateFactoryBarnManager { } } - fun trySendBarnFullMessage() { + @SubscribeEvent + fun onInventoryClose(event: InventoryCloseEvent) { + sentBarnFullWarning = false + } + + fun trySendBarnFullMessage(inventory: Boolean) { if (!ChocolateFactoryAPI.isEnabled()) return if (config.barnCapacityThreshold <= 0) { @@ -79,7 +83,9 @@ object ChocolateFactoryBarnManager { barnFull = remainingSpace <= config.barnCapacityThreshold if (!barnFull) return - if (lastBarnFullWarning.passedSince() < 30.seconds) return + if (inventory && sentBarnFullWarning) return + + sentBarnFullWarning = true if (profileStorage.maxRabbits == -1) { ChatUtils.clickableChat( @@ -99,7 +105,6 @@ object ChocolateFactoryBarnManager { "§eClick to run /cf!", ) SoundUtils.playBeepSound() - lastBarnFullWarning = SimpleTimeMark.now() } fun barnStatus(): String { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt index 5dd8a52d38c7..3724dbc53576 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt @@ -279,7 +279,7 @@ object ChocolateFactoryDataLoader { item.getLore().matchFirst(barnAmountPattern) { profileStorage.currentRabbits = group("rabbits").formatInt() profileStorage.maxRabbits = group("max").formatInt() - ChocolateFactoryBarnManager.trySendBarnFullMessage() + ChocolateFactoryBarnManager.trySendBarnFullMessage(inventory = true) } } From ecb0e3e7cca8dffcdfd187499fb4beb1bdc5f0bf Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 7 Jul 2024 16:06:39 +0200 Subject: [PATCH 44/44] Version 0.26 Beta 16 --- build.gradle.kts | 2 +- docs/CHANGELOG.md | 11 ++++++++++- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7e8c141bd3ce..a25a71a117d6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.26.Beta.15" +version = "0.26.Beta.16" val gitHash by lazy { val baos = ByteArrayOutputStream() diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a0be0b30c02f..db47ad29ed3d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -189,8 +189,10 @@ + Added Carnival lines to the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1995) + Made the unclaimed eggs GUI clickable. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1934) + Improve punctuation in the rabbit barn full/almost full messages. - Luna (https://github.com/hannibal002/SkyHanni/pull/2146) -+ Seperate option for Unclaimed Eggs warning while "Busy". - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2091) ++ Separate option for Unclaimed Eggs warning while "Busy". - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2091) + In the Rift, Kuudra, Dungeons, etc. ++ Hoppity and Chocolate reminders/warnings now appear less frequently and are less intrusive. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2196) ++ Add a configuration option to allow Time Tower to appear in the Chocolate Factory next upgrade list. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2142) #### Mining Improvements @@ -361,6 +363,7 @@ + Fix Custom Scoreboard Error while voting. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2184) + Fix Custom Scoreboard Error during the Winter Event. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2192) + Fix Custom Scoreboard Error in Kuudra. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2176) ++ Fix New Mayor perks not showing up on the Scoreboard. - Stella (https://github.com/hannibal002/SkyHanni/pull/2187) #### Dungeon Fixes @@ -414,6 +417,7 @@ + Fix favorited pets not being detected. - Empa (https://github.com/hannibal002/SkyHanni/pull/2188) + Fix wrong item prices in Estimated Item Value when the craft price is higher than the NPC price and the item is soulbound. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2173) + E.g. for Gillsplash (fishing equipment). ++ Fix Custom Wardrobe Keybinds not working. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2198) #### Combat Fixes @@ -452,6 +456,7 @@ + Fix launchers showing SkyHanni as LibNinePatch. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2147) + Fix "/worldedit right" setting the left position. - HiZe (https://github.com/hannibal002/SkyHanni/pull/2179) + Fix a bug in the Hypixel detection. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2193) ++ Fix random Stack Overflow Errors. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2199) ### Technical Details @@ -551,6 +556,10 @@ + Add carnival mask to item category. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2189) + Fix pattern for Dragon Widget. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2190) + Changed the readme.md file. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2174) ++ Add Mob Detection First Seen Event. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2096) ++ Mob Detection now runs every tick instead of every other tick. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2096) ++ RepoPattern locale loading now works inversely for the development environment. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2069) ++ Move Hoppity Rabbit chat patterns to the eggs manager. - sayomaki (https://github.com/hannibal002/SkyHanni/pull/2144) ### Removed Features diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 11ec22d5e556..da3ff292b0f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -42,7 +42,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.26.Beta.15", + version = "0.26.Beta.16", ) class SkyHanniMod {