diff --git a/.editorconfig b/.editorconfig
index 0c2021243d7c..e2edaad54308 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -21,13 +21,37 @@ max_line_length = 120
# Java Files
[*.java]
# Java files should not use wildcard imports
-ij_java_names_count_to_use_import_on_demand = 999
-ij_java_class_count_to_use_import_on_demand = 999
-ij_java_packages_to_use_import_on_demand =
+ij_java_names_count_to_use_import_on_demand = 2147483647
+ij_java_class_count_to_use_import_on_demand = 2147483647
+ij_java_packages_to_use_import_on_demand = 2147483647
[*.kt]
+ktlint_code_style = intellij_idea
+
# Kotlin files should not use wildcard imports
-ij_kotlin_name_count_to_use_star_import = 999
-ij_kotlin_name_count_to_use_star_import_for_members = 999
-ij_kotlin_packages_to_use_import_on_demand =
+ij_kotlin_name_count_to_use_star_import = 2147483647
+ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_enum_constants_wrap = split_into_lines
+ij_kotlin_allow_trailing_comma_on_call_site = true
+ij_kotlin_allow_trailing_comma = true
+ktlint_standard_chain-wrapping = always
+
+ktlint_standard_multiline-if-else = disabled
+ktlint_standard_no-empty-first-line-in-class-body = disabled
+ktlint_standard_no-single-line-block-comment = disabled
+ktlint_standard_no-blank-line-before-rbrace = disabled
+ktlint_standard_no-consecutive-blank-lines = disabled
+ktlint_standard_no-empty-first-line-in-method-block = disabled
+ktlint_standard_comment-spacing = disabled
+ktlint_standard_string-template = disabled
+ktlint_standard_trailing-comma-on-call-site = disabled
+ktlint_standard_trailing-comma-on-declaration-site = disabled
+ktlint_standard_context-receiver-wrapping = disabled
+ktlint_standard_multiline-expression-wrapping = false
+ktlint_standard_string-template-indent = disabled
+ktlint_standard_no-trailing-spaces = disabled
+ktlint_standard_function-signature = disabled
+ktlint_standard_wrapping = enabled
+
+ktlint_standard_no-wildcard-imports = enabled
+ktlint_standard_function-expression-body = disabled
\ No newline at end of file
diff --git a/.github/workflows/check-style.yaml b/.github/workflows/check-style.yaml
new file mode 100644
index 000000000000..ff172208f8bc
--- /dev/null
+++ b/.github/workflows/check-style.yaml
@@ -0,0 +1,16 @@
+name: check-style
+on:
+ - pull_request
+jobs:
+ ktlint:
+ name: Check Style
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ name: Checkout code
+ - name: ktlint
+ uses: ScaCap/action-ktlint@master
+ with:
+ github_token: ${{ secrets.github_token }}
+ reporter: github-pr-check
diff --git a/.idea/dictionaries/default_user.xml b/.idea/dictionaries/default_user.xml
index dcb32b1cd09d..c195bb1f4d61 100644
--- a/.idea/dictionaries/default_user.xml
+++ b/.idea/dictionaries/default_user.xml
@@ -27,12 +27,14 @@
cadycous
carrolyn
cata
+ cavespider
chestplate
chocolatefactory
chronomatron
chumcap
coflnet
coords
+ craftable
cropie
crosshair
deathmite
@@ -42,7 +44,9 @@
derpy
despawn
dicer
+ dragontail
dreadfarm
+ dungeoneering
dwarven
egglocator
einary
@@ -73,9 +77,12 @@
hypixel
hypixel's
ichor
+ igrupan
+ igrupan's
ingame
inquis
inquistiors
+ internalname
interp
itemstack
jawbus
@@ -89,6 +96,7 @@
kismets
kloon
kuudra
+ kuudra's
laggy
lapis
larvas
@@ -120,14 +128,17 @@
nukekebi
nukekubi
odger
+ odger's
odonata
odonatas
opengenerowmenu
opti
oruo
packmaster
+ perkpocalypse
pickblock
pickonimbus
+ plhlegblast
preinitialization
procs
pyrochaos
@@ -141,6 +152,7 @@
riftstalker
robotron
sadan
+ scatha
sethome
shcopytranslation
shcropstartlocation
@@ -165,6 +177,7 @@
sprayonator
stillgore
superboom
+ supercraft
supercrafting
superlite
superpairs
diff --git a/.live-plugins/event/plugin.kts b/.live-plugins/event/plugin.kts
new file mode 100644
index 000000000000..d012154b881f
--- /dev/null
+++ b/.live-plugins/event/plugin.kts
@@ -0,0 +1,76 @@
+import com.intellij.codeInspection.LocalQuickFix
+import com.intellij.codeInspection.ProblemDescriptor
+import com.intellij.codeInspection.ProblemHighlightType
+import com.intellij.codeInspection.ProblemsHolder
+import com.intellij.openapi.project.Project
+import com.intellij.psi.PsiElementVisitor
+import liveplugin.registerInspection
+import org.jetbrains.kotlin.idea.base.utils.fqname.fqName
+import org.jetbrains.kotlin.idea.codeinsight.api.classic.inspections.AbstractKotlinInspection
+import org.jetbrains.kotlin.idea.util.AnnotationModificationHelper
+import org.jetbrains.kotlin.name.FqName
+import org.jetbrains.kotlin.nj2k.postProcessing.type
+import org.jetbrains.kotlin.psi.KtNamedFunction
+import org.jetbrains.kotlin.psi.KtVisitorVoid
+import org.jetbrains.kotlin.psi.psiUtil.isPublic
+import org.jetbrains.kotlin.types.typeUtil.supertypes
+
+// depends-on-plugin org.jetbrains.kotlin
+
+val skyhanniEvent = "at.hannibal2.skyhanni.api.event.SkyHanniEvent"
+val handleEvent = "HandleEvent"
+
+registerInspection(HandleEventInspectionKotlin())
+
+class HandleEventInspectionKotlin : AbstractKotlinInspection() {
+ override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
+
+ val visitor = object : KtVisitorVoid() {
+ override fun visitNamedFunction(function: KtNamedFunction) {
+ val hasEventAnnotation = function.annotationEntries.any { it.shortName!!.asString() == handleEvent }
+ val isEvent = function.valueParameters.firstOrNull()?.type()?.supertypes()
+ ?.any { it.fqName?.asString() == skyhanniEvent } ?: false
+
+ if (isEvent && !hasEventAnnotation && function.valueParameters.size == 1 && function.isPublic) {
+ holder.registerProblem(
+ function,
+ "Event handler function should be annotated with @HandleEvent",
+ HandleEventQuickFix()
+ )
+ } else if (!isEvent && hasEventAnnotation) {
+ holder.registerProblem(
+ function,
+ "Function should not be annotated with @HandleEvent if it does not take a SkyHanniEvent",
+ ProblemHighlightType.GENERIC_ERROR
+ )
+ }
+ }
+ }
+
+ return visitor
+ }
+
+ override fun getDisplayName() = "Event handler function should be annotated with @HandleEvent"
+ override fun getShortName() = "HandleEventInspection"
+ override fun getGroupDisplayName() = "SkyHanni"
+ override fun isEnabledByDefault() = true
+}
+
+class HandleEventQuickFix : LocalQuickFix {
+ override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
+ val function = descriptor.psiElement as KtNamedFunction
+ AnnotationModificationHelper.addAnnotation(
+ function,
+ FqName("at.hannibal2.skyhanni.api.event.HandleEvent"),
+ null,
+ null,
+ { null },
+ " ",
+ null
+ )
+ }
+
+ override fun getName() = "Annotate with @HandleEvent"
+
+ override fun getFamilyName() = name
+}
diff --git a/.live-plugins/module/plugin.kts b/.live-plugins/module/plugin.kts
new file mode 100644
index 000000000000..286160a9ba8a
--- /dev/null
+++ b/.live-plugins/module/plugin.kts
@@ -0,0 +1,101 @@
+import com.intellij.codeInspection.LocalQuickFix
+import com.intellij.codeInspection.ProblemDescriptor
+import com.intellij.codeInspection.ProblemHighlightType
+import com.intellij.codeInspection.ProblemsHolder
+import com.intellij.openapi.project.Project
+import com.intellij.psi.PsiElementVisitor
+import liveplugin.registerInspection
+import liveplugin.show
+import org.jetbrains.kotlin.idea.base.utils.fqname.fqName
+import org.jetbrains.kotlin.idea.codeinsight.api.classic.inspections.AbstractKotlinInspection
+import org.jetbrains.kotlin.idea.util.AnnotationModificationHelper
+import org.jetbrains.kotlin.name.FqName
+import org.jetbrains.kotlin.nj2k.postProcessing.type
+import org.jetbrains.kotlin.psi.*
+
+// depends-on-plugin org.jetbrains.kotlin
+
+val forgeEvent = "SubscribeEvent"
+val handleEvent = "HandleEvent"
+val skyHanniModule = "SkyHanniModule"
+
+val patternGroup = "at.hannibal2.skyhanni.utils.repopatterns.RepoPatternGroup"
+val pattern = "java.util.regex.Pattern"
+
+registerInspection(ModuleInspectionKotlin())
+
+fun isEvent(function: KtNamedFunction): Boolean {
+ return function.annotationEntries.any {
+ it.shortName!!.asString() == handleEvent || it.shortName!!.asString() == forgeEvent
+ }
+}
+
+fun isRepoPattern(property: KtProperty): Boolean {
+ val type = property.type()?.fqName?.asString() ?: return false
+ if (type == patternGroup) return true
+ if (type == pattern && property.hasDelegate()) return true
+ return false
+}
+
+class ModuleInspectionKotlin : AbstractKotlinInspection() {
+ override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
+
+ val visitor = object : KtVisitorVoid() {
+
+ override fun visitClass(klass: KtClass) {
+ val hasAnnotation = klass.annotationEntries.any { it.shortName?.asString() == skyHanniModule }
+
+ if (hasAnnotation) {
+ holder.registerProblem(
+ klass.nameIdentifier!!,
+ "@SkyHanniModule can only be applied to objects",
+ ProblemHighlightType.GENERIC_ERROR
+ )
+ }
+ }
+
+ override fun visitObjectDeclaration(declaration: KtObjectDeclaration) {
+ if (declaration.isCompanion()) return
+ val hasAnnotation = declaration.annotationEntries.any { it.shortName?.asString() == skyHanniModule }
+ if (hasAnnotation) return
+
+ val hasSkyHanniEvents = declaration.body!!.functions.any { function -> isEvent(function) }
+ val hasRepoPatterns = declaration.body!!.properties.any { property -> isRepoPattern(property) }
+ if (!hasSkyHanniEvents && !hasRepoPatterns) return
+
+ holder.registerProblem(
+ declaration,
+ "Module should have a @SkyHanniModule annotation",
+ ModuleQuickFix()
+ )
+ }
+ }
+
+ return visitor
+ }
+
+ override fun getDisplayName() = "Modules should have a @SkyHanniModule annotation"
+ override fun getShortName() = "SkyHanniModuleInspection"
+ override fun getGroupDisplayName() = "SkyHanni"
+ override fun isEnabledByDefault() = true
+}
+
+class ModuleQuickFix : LocalQuickFix {
+ override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
+ val obj = descriptor.psiElement as KtObjectDeclaration
+ AnnotationModificationHelper.addAnnotation(
+ obj,
+ FqName("at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule"),
+ null,
+ null,
+ { null },
+ " ",
+ null
+ )
+ show("Annotation applied, make sure SkyHanniMod isn't still loading this module")
+ }
+
+ override fun getName() = "Annotate with @SkyHanniModule"
+
+ override fun getFamilyName() = name
+}
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 bc7d262b49d5..99d7904d0b33 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
@@ -1,5 +1,7 @@
package at.hannibal2.skyhanni.skyhannimodule
+import com.google.devtools.ksp.getClassDeclarationByName
+import com.google.devtools.ksp.getDeclaredFunctions
import com.google.devtools.ksp.processing.CodeGenerator
import com.google.devtools.ksp.processing.Dependencies
import com.google.devtools.ksp.processing.KSPLogger
@@ -8,13 +10,24 @@ import com.google.devtools.ksp.processing.SymbolProcessor
import com.google.devtools.ksp.symbol.ClassKind
import com.google.devtools.ksp.symbol.KSAnnotated
import com.google.devtools.ksp.symbol.KSClassDeclaration
+import com.google.devtools.ksp.symbol.KSType
import com.google.devtools.ksp.validate
import java.io.OutputStreamWriter
class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logger: KSPLogger) : SymbolProcessor {
+ // TODO remove once all events are migrated to SkyHanniEvent
+ private var skyHanniEvent: KSType? = null
+ private var minecraftForgeEvent: KSType? = null
+ private val warnings = mutableListOf()
+
override fun process(resolver: Resolver): List {
+ skyHanniEvent =
+ resolver.getClassDeclarationByName("at.hannibal2.skyhanni.api.event.SkyHanniEvent")?.asStarProjectedType()
+ minecraftForgeEvent = resolver.getClassDeclarationByName("net.minecraftforge.fml.common.eventhandler.Event")
+ ?.asStarProjectedType()
+
val symbols = resolver.getSymbolsWithAnnotation(SkyHanniModule::class.qualifiedName!!).toList()
val validSymbols = symbols.mapNotNull { validateSymbol(it) }
@@ -41,10 +54,42 @@ class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logg
return null
}
+ // TODO remove once all events are migrated to SkyHanniEvent
+ val className = symbol.qualifiedName?.asString() ?: "unknown"
+
+ for (function in symbol.getDeclaredFunctions()) {
+ if (function.annotations.any { it.shortName.asString() == "SubscribeEvent" }) {
+ val firstParameter = function.parameters.firstOrNull()?.type?.resolve()!!
+ if (!minecraftForgeEvent!!.isAssignableFrom(firstParameter)) {
+ warnings.add("Function in $className must have an event assignable from $minecraftForgeEvent because it is annotated with @SubscribeEvent")
+ }
+ }
+
+ if (function.annotations.any { it.shortName.asString() == "HandleEvent" }) {
+ val firstParameter = function.parameters.firstOrNull()?.type?.resolve()!!
+ if (!skyHanniEvent!!.isAssignableFrom(firstParameter)) {
+ warnings.add("Function in $className must have an event assignable from $skyHanniEvent because it is annotated with @HandleEvent")
+ }
+ }
+ }
+
return symbol
}
+ //TODO remove when KMixins added as it contains KSP annotation helpers.
+ private fun isDevAnnotation(klass: KSClassDeclaration): Boolean {
+ val annotation = klass.annotations.find { it.shortName.asString() == "SkyHanniModule" } ?: return false
+ return annotation.arguments.find { it.name?.asString() == "devOnly" }?.value as? Boolean ?: false
+ }
+
+ // TODO use Kotlin Poet once KMixins is merged
private fun generateFile(symbols: List) {
+
+ if (warnings.isNotEmpty()) {
+ warnings.forEach { logger.warn(it) }
+ 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)
@@ -53,13 +98,18 @@ class ModuleProcessor(private val codeGenerator: CodeGenerator, private val logg
OutputStreamWriter(file).use {
it.write("package at.hannibal2.skyhanni.skyhannimodule\n\n")
it.write("object LoadedModules {\n")
- it.write(" val modules: List = listOf(\n")
+ it.write(" val isDev: Boolean = at.hannibal2.skyhanni.utils.system.PlatformUtils.isDevEnvironment\n")
+ it.write(" val modules: List = buildList {\n")
symbols.forEach { symbol ->
- it.write(" ${symbol.qualifiedName!!.asString()},\n")
+ if (isDevAnnotation(symbol)) {
+ it.write(" if (isDev) add(${symbol.qualifiedName!!.asString()})\n")
+ } else {
+ it.write(" add(${symbol.qualifiedName!!.asString()})\n")
+ }
}
- it.write(" )\n")
+ it.write(" }\n")
it.write("}\n")
}
diff --git a/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/SkyHanniModule.kt b/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/SkyHanniModule.kt
index cb6b0eae4c48..c854a572ce65 100644
--- a/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/SkyHanniModule.kt
+++ b/annotation-processors/src/main/kotlin/at/hannibal2/skyhanni/skyhannimodule/SkyHanniModule.kt
@@ -2,4 +2,9 @@ package at.hannibal2.skyhanni.skyhannimodule
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE)
-annotation class SkyHanniModule
+annotation class SkyHanniModule(
+ /**
+ * If the module will only be loaded in a development environment.
+ */
+ val devOnly: Boolean = false,
+)
diff --git a/build.gradle.kts b/build.gradle.kts
index 1ef16722dbae..3b48bab11116 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -16,7 +16,7 @@ plugins {
}
group = "at.hannibal2.skyhanni"
-version = "0.26.Beta.6"
+version = "0.26.Beta.8"
val gitHash by lazy {
val baos = ByteArrayOutputStream()
@@ -133,10 +133,6 @@ dependencies {
implementation("net.hypixel:mod-api:0.3.1")
}
-ksp {
- arg("symbolProcessor", "at.hannibal2.skyhanni.loadmodule.LoadModuleProvider")
-}
-
configurations.getByName("minecraftNamed").dependencies.forEach {
shot.applyTo(it as HasConfigurableAttributes<*>)
}
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 48144d882fdf..0c94c43cdfa3 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -72,6 +72,9 @@
raven (https://github.com/hannibal002/SkyHanni/pull/1738)
+ Wand of Strength cooldown is now displayed. - saga (https://github.com/hannibal002/SkyHanni/pull/1948)
+ The cooldown displayed is for the buff, not the item usage.
++ Added Favorite Power Stones. - saga (https://github.com/hannibal002/SkyHanni/pull/2002)
+ + Highlighted in the Thaumaturgy inventory.
+ + Shift-click to add/remove them.
#### Fishing Features
@@ -112,6 +115,7 @@
+ Added an option for a compacted Dicer RNG Drop Tracker Display. -
Jordyrat (https://github.com/hannibal002/SkyHanni/pull/1735)
+ Also shortened the default display.
++ Minor GUI improvements in /ff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/873)
#### Hoppity Event Improvements
@@ -126,6 +130,8 @@
maxime-bodifee (https://github.com/hannibal002/SkyHanni/pull/1926)
+ Adjusted and added Rabbit Uncle & Dog Keybinds. - raven (https://github.com/hannibal002/SkyHanni/pull/1907)
+ Added a distinct sound for the special stray rabbit. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1913)
++ Added collected egg location API import. - appable (https://github.com/hannibal002/SkyHanni/pull/1972)
+ + Open your NEU profile viewer and click the chat message to load data.
#### Mining Improvements
@@ -155,6 +161,9 @@
+ Improved Bazaar re-buy order helper to also search in the Bazaar upon chat message click. -
hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1946)
+ Clarified the maximum clicks message for experiments. - Luna (https://github.com/hannibal002/SkyHanni/pull/1963)
++ Improved Attribute Prices in Estimated Item Value. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2020)
+ + Ignoring irrelevant attributes (Resistance, Speed, Experience, etc).
+ + No longer counting attribute combos or single attribute prices when cheaper than the base item price.
#### Fishing Improvements
@@ -166,6 +175,10 @@
+ Reduced the frequency of Diana sound guess hints while the feature is working correctly. -
hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1954)
+#### Crimson Isle
+
++ Crimson Isle Reputation Helper now warns when the Faction Quest Widget is disabled in the tab list. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1977)
+
#### Misc Improvements
+ Added a toggle for 24-hour time. - seraid (https://github.com/hannibal002/SkyHanni/pull/1804)
@@ -176,6 +189,8 @@
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 support for Fancy Contributors in nametags. - Empa (https://github.com/hannibal002/SkyHanni/pull/1687)
### Fixes
@@ -193,6 +208,7 @@
+ Fixed a typo in Tunnels Maps. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1883)
+ Fixed error with SkyMall with Titanium buff. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1967)
+ Fixed swapped mining event display icons. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1958)
++ Fixed Area Walls being broken in Nucleus. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1994)
#### Garden Fixes
@@ -201,6 +217,10 @@
raven (https://github.com/hannibal002/SkyHanni/pull/1849)
+ Fixed /shcropgoal not working with double-name crops (wart, cocoa, cane). -
L3Cache (https://github.com/hannibal002/SkyHanni/pull/1970)
++ Fixed Garden Visitor Drop Statistics not tracking new data. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1976)
+ + This may also fix the display not showing up.
++ Fixed Non-Craftable Items breaking the Visitor Shopping List. - jani/hannibal2/nea (https://github.com/hannibal002/SkyHanni/pull/2019)
++ Fixed stats in visitor inventory not showing under certain circumstances. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2018)
#### Chocolate Factory & Hoppity Hunt Fixes
@@ -230,12 +250,14 @@
+ Fixed typo in /shclearkismet command. - fahr-plan (https://github.com/hannibal002/SkyHanni/pull/1912)
+ Fixed 'viewrecipe' lowercase not working. - Obsidian + hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1939)
++ Fixed rare cases where queued /gfs didn't work. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1999)
#### Fishing Fixes
+ Fixed Thunder and Jawbus not being highlighted by Highlight Rare Sea Creatures. -
Empa (https://github.com/hannibal002/SkyHanni/pull/1858)
+ Fixed Trophy Fish Display not working for stranded players. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1966)
++ Fixed Sea Creature highlight not working when the damage indicator was enabled. - Empa (https://github.com/hannibal002/SkyHanni/pull/1985)
#### Performance Fixes
@@ -267,6 +289,12 @@
CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1920)
+ Fixed the GUI editor opening unintentionally. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1973)
+ Fixed movable hotbar conflicts with some mods. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1965)
++ Fixed crashes caused by tooltips. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1986)
++ Fixed config reset on encountering unknown enum values in the config. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1990)
++ Config no longer resets when an incorrect value is entered. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Config no longer resets when downgrading versions. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Fixed accidental hiding of boss bars. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1980)
++ Fixed Account Upgrade Reminder feature with simultaneous account and profile upgrades. - appable (https://github.com/hannibal002/SkyHanni/pull/2007)
### Technical Details
@@ -289,6 +317,33 @@
+ Added unit test for repo pattern lists. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1733)
+ Added RepoPattern.exclusiveGroup. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1733)
+ 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)
++ 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)
+ + This is done via an in-Kotlin delegate constructor, since calling functions with default arguments that have an inline class type from Java is not stable.
++ Added SimpleStringTypeAdapter. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Added SkippingTypeAdapterFactory. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Cleaned up ConfigManager. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Moved json package inside the utils package. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1979)
++ Added Tab Widget abstraction. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1150)
++ Added EntityDisplayNameEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/1687)
++ Make build fail when event functions have wrong annotation. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2024)
++ Begin transitioning to the new event system. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2023)
++ Added custom event bus. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/2008)
+ + Added live plugin to show when an event method is missing its annotation.
++ Changed Java to Kotlin for repository files. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1543)
++ Made in-game date display use a pattern instead of repository. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1543)
++ All /gfs calls go through gfs API now. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1999)
++ Made ItemHoverEvent be called earlier. - Vixid (https://github.com/hannibal002/SkyHanni/pull/2018)
++ Removed deprecated bazaar variables. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1987)
++ Removed another deprecated function. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1956)
++ Used event.cancel() over event.isCanceled = true for LorenzEvents. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1915)
++ Converted classes to objects, then used annotation. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1982)
++ Added annotations to objects. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1974)
++ Added module plugin. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1974)
## Version 0.25
@@ -1841,7 +1896,7 @@
+ For better maintainability and automatic beta changelog creation.
+ Use less forge events throughout the mod to reduce possible crashes. -
CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1085)
-+ Fix entity click not being canceled - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1072)
++ Fix entity click not being cancelled - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1072)
+ Cleanup ItemClickData. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1072)
+ Fixes minecraft bug where text that is bold can render weirdly. -
CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1126)
@@ -2199,7 +2254,7 @@
+ Auto-fixing plots marked as pests when killing all pests without SkyHanni earlier. - hannibal2
+ Fixed error message that nearest pests cannot get removed properly. - hannibal2
+ Fixed grammar in Jacob Contest chat messages. - Alexia Luna
-+ Fixed rarity error for items thrown around when using Sprayanator. - hannibal2
++ Fixed rarity error for items thrown around when using Sprayonator. - hannibal2
+ Added cooldown to Garden Warp Commands. - Empa
+ Fixed the detection of Anita and Jacob visitors. - hannibal2
+ Fixed the pets menu detection for /ff. - martimavocado
@@ -2483,7 +2538,7 @@
+ Show a Title when a pest spawns. - hannibal2
+ Show the time since the last pest spawned in your garden. - hannibal2
+ Option to only show the time while holding vacuum in the hand.
-+ Show the pests that are attracted when changing the selected material of the Sprayanator. - hannibal2
++ Show the pests that are attracted when changing the selected material of the Sprayonator. - hannibal2
+ Added Garden only commands /home, /barn and /tp, and hotkeys. - hannibal2
+ Showing a better plot name in the scoreboard. Updates faster and doesn't hide when pests are spawned. - hannibal2
+ Show a display with all known pest locations. - hannibal2
@@ -2569,7 +2624,7 @@
+ Added Waypoints for 2023 Lobby Presents. - walker
+ Added New Year Cake Reminder. - hannibal2
-#### Stranded Featuers
+#### Stranded Features
+ Highlights NPCs in the stranded menu that are placeable but havent been placed. - walker
@@ -2672,7 +2727,7 @@
+ Added toggle to hide autopet messages. - CalMWolfs
+ Not only Slayer, also Fishing and Diana item drops will now show in chat & title when over a custom defined price. -
hannibal2
-+ Added Support to read Badlion sendcoords format. - Cad
++ Added Support to read BadLion sendcoords format. - Cad
+ Added an option to not show cooldown when ability is ready. - Obsidian
+ Added an option to highlight dungeon perm/vc parties. - Cad
+ Added Glowing Mush Mixin support to the Non-God Pod display. - jani
@@ -2699,7 +2754,7 @@
+ Show a text around the new year that the calendar is not loaded for the next Jacob Contest. - hannibal2
+ Fixed visitor reward item refuse inconsistencies. - hannibal2
+ Fixed wrong base 100ff calculations in the farming fortune needed display. - Alexia Luna
-+ Fixed showing Sprayanator plot grid overlay outside garden. - HiZe
++ Fixed showing Sprayonator plot grid overlay outside garden. - HiZe
+ Fixed an error message in the composter inventory when hovering over some items. - hannibal2
+ Correctly load the plot names of locked plots from inventory. - hannibal2
+ Fixed the boosted crop not being highlighted during contest participation. - Alexia Luna
@@ -2773,7 +2828,7 @@
+ Fixed the city project time remaining "soon!" error. - hannibal2
+ Fixed Slayer Profit Tracker display and price problems with Wisp's Ice Flavored Water Potion. - hannibal2
+ Fixed an error message when closing the wheat minion in the Hub. - Thunderblade73
-+ Fixed locraw sending outside Hypixel. - walker
++ Fixed /locraw sending outside Hypixel. - walker
+ Fixed finished city project still reminding and suggests buying items. - hannibal2
+ Open the city project inventory once again to fix warnings correctly.
+ Fixed kick alert triggering instantly. - Alexia Luna
@@ -2826,7 +2881,7 @@
+ Added test command /shsendtitle - Cad
+ Saving bingo goal data into the config. - hannibal2
+ Added WorldEdit region selection preview support. - nea
- + Command /shworldedit and rigth/left clicking with a wood axe work.
+ + Command /shworldedit and right/left clicking with a wood axe work.
+ Fixed error message in the "/shconfig set" command. - Thunderblade73
+ Add a check for the SkyHanni repository ID in publish. - walker
+ Cleanup getItemsInOpenChest. - walker
@@ -3057,7 +3112,7 @@
#### Events
-+ Highlight Jerries during the Jerrypoclaypse. - Erymanthus
++ Highlight Jerries during the Jerrypocalypse. - Erymanthus
+ Show waypoints for Baskets of the Halloween Event in the main Hypixel lobby. - Erymanthus
+ Thanks Tobbbb for the coordinates!
+ Support for hiding basket waypoints once you have clicked on them. - hannibal2
@@ -3257,7 +3312,7 @@
+ Fixed the leftStronghold area not getting detected. - hannibal2
+ Fixed error message with Ashfang Blazes. - hannibal2
+ Fixed crash with pet exp tooltip. - hannibal2
-+ Fixed dungeoneering showing as 0 in the skill menu. - hannibal2
++ Fixed Dungeoneering showing as 0 in the skill menu. - hannibal2
+ Fixed showing minion level as 101 in some menus. - hannibal2
#### Config
@@ -3322,7 +3377,7 @@
+ **King Talisman Helper**
+ Show kings you have not talked to yet, and when the next missing king will appear.
+ **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.
+ **Ender Node Tracker** - pretz
+ Tracks items and profit obtained from mining ender nodes and killing normal endermen.
+ **Fishing timer** now works in **Crystal Hollows** as well. (Worm fishing)
@@ -4232,7 +4287,7 @@
+ Add two more chat filter categories: Powder Mining and Winter Gifts.
+ Add catacombs class level color to party finder.
+ Add wishing compass uses amount display.
-+ Saves missing items from canceled buy orders to clipboard for faster re-entry.
++ Saves missing items from cancelled buy orders to clipboard for faster re-entry.
+ Adds a visual highlight to the Croesus inventory that show what chests have not yet been opened.
### Removals
diff --git a/docs/FEATURES.md b/docs/FEATURES.md
index bf1ab853f127..6e549a1cfab0 100644
--- a/docs/FEATURES.md
+++ b/docs/FEATURES.md
@@ -203,6 +203,9 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Option to remove enchant descriptions.
+ Option to change enchant formatting.
+ Also parses tooltips from /show.
++ Favorite Power Stones. - saga (https://github.com/hannibal002/SkyHanni/pull/2002)
+ + Highlighted in the Thaumaturgy inventory.
+ + Shift-click to add/remove them.
@@ -277,7 +280,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Showing colors in the order inventory for outbid or fully bought/sold items.
+ Best Sell Method (Calculating the difference between instant-selling or using sell order for a selected bazaar item)
-+ Saves missing items from canceled buy orders to clipboard for faster re-entry.
++ Saves missing items from cancelled buy orders to clipboard for faster re-entry.
+ Update Timer showing when the next api data update happens.
+ Price Website button. - hannibal2
+ Adds a button to the bazaar product inventory that will open the item page in skyblock.bz.
@@ -669,7 +672,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Show a Title when a pest spawns. - hannibal2
+ Show the time since the last pest spawned in your garden. - hannibal2
+ Option to only show the time while holding vacuum in the hand.
-+ Show the pests that are attracted when changing the selected material of the Sprayanator. - hannibal2
++ Show the pests that are attracted when changing the selected material of the Sprayonator. - hannibal2
+ Garden only commands /home, /barn and /tp, and hotkeys. - hannibal2
+ Showing a better plot name in the scoreboard. Updates faster and doesn't hide when pests are spawned. - hannibal2
+ Show a display with all known pest locations. - hannibal2
@@ -854,7 +857,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
-+ Highlight Jerries during the Jerrypoclaypse. - Erymanthus
++ Highlight Jerries during the Jerrypocalypse. - Erymanthus
+ Show waypoints for Baskets of the Halloween Event in the main Hypixel lobby. - Erymanthus
+ Thanks Tobbbb for the coordinates!
+ Support for hiding basket waypoints once you have clicked on them. - hannibal2
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index a3143ee36ac3..dde349f04b3e 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -1,485 +1,31 @@
package at.hannibal2.skyhanni
-import at.hannibal2.skyhanni.api.CollectionAPI
-import at.hannibal2.skyhanni.api.DataWatcherAPI
-import at.hannibal2.skyhanni.api.GetFromSackAPI
-import at.hannibal2.skyhanni.api.SkillAPI
+import at.hannibal2.skyhanni.api.event.SkyHanniEvents
import at.hannibal2.skyhanni.config.ConfigFileType
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.config.Features
import at.hannibal2.skyhanni.config.SackData
import at.hannibal2.skyhanni.config.commands.Commands
-import at.hannibal2.skyhanni.data.ActionBarData
-import at.hannibal2.skyhanni.data.ActionBarStatsData
-import at.hannibal2.skyhanni.data.BitsAPI
-import at.hannibal2.skyhanni.data.BlockData
-import at.hannibal2.skyhanni.data.BossbarData
-import at.hannibal2.skyhanni.data.CropAccessoryData
-import at.hannibal2.skyhanni.data.EntityMovementData
-import at.hannibal2.skyhanni.data.EventCounter
-import at.hannibal2.skyhanni.data.FameRanks
-import at.hannibal2.skyhanni.data.FixedRateTimerManager
-import at.hannibal2.skyhanni.data.FriendAPI
-import at.hannibal2.skyhanni.data.GardenComposterUpgradesData
-import at.hannibal2.skyhanni.data.GardenCropMilestones
-import at.hannibal2.skyhanni.data.GardenCropMilestonesCommunityFix
-import at.hannibal2.skyhanni.data.GardenCropUpgrades
-import at.hannibal2.skyhanni.data.GuiData
-import at.hannibal2.skyhanni.data.GuiEditManager
-import at.hannibal2.skyhanni.data.GuildAPI
-import at.hannibal2.skyhanni.data.HighlightOnHoverSlot
-import at.hannibal2.skyhanni.data.HotmData
import at.hannibal2.skyhanni.data.HypixelData
-import at.hannibal2.skyhanni.data.ItemAddManager
-import at.hannibal2.skyhanni.data.ItemClickData
-import at.hannibal2.skyhanni.data.ItemTipHelper
-import at.hannibal2.skyhanni.data.LocationFixData
-import at.hannibal2.skyhanni.data.MaxwellAPI
-import at.hannibal2.skyhanni.data.MayorAPI
-import at.hannibal2.skyhanni.data.MinecraftData
-import at.hannibal2.skyhanni.data.MiningAPI
import at.hannibal2.skyhanni.data.OtherInventoryData
-import at.hannibal2.skyhanni.data.OwnInventoryData
-import at.hannibal2.skyhanni.data.PartyAPI
-import at.hannibal2.skyhanni.data.PetAPI
-import at.hannibal2.skyhanni.data.ProfileStorageData
-import at.hannibal2.skyhanni.data.PurseAPI
-import at.hannibal2.skyhanni.data.QuiverAPI
-import at.hannibal2.skyhanni.data.RenderData
-import at.hannibal2.skyhanni.data.SackAPI
-import at.hannibal2.skyhanni.data.ScoreboardData
-import at.hannibal2.skyhanni.data.ScreenData
import at.hannibal2.skyhanni.data.SkillExperience
-import at.hannibal2.skyhanni.data.SlayerAPI
-import at.hannibal2.skyhanni.data.TitleData
-import at.hannibal2.skyhanni.data.TitleManager
-import at.hannibal2.skyhanni.data.TrackerManager
-import at.hannibal2.skyhanni.data.bazaar.HypixelBazaarFetcher
-import at.hannibal2.skyhanni.data.hypixel.chat.PlayerChatManager
-import at.hannibal2.skyhanni.data.hypixel.chat.PlayerNameFormatter
import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.JacobContestsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.KnownFeaturesJson
import at.hannibal2.skyhanni.data.jsonobjects.local.VisualWordsJson
-import at.hannibal2.skyhanni.data.mob.MobData
-import at.hannibal2.skyhanni.data.mob.MobDebug
-import at.hannibal2.skyhanni.data.mob.MobDetection
-import at.hannibal2.skyhanni.data.model.TabWidget
import at.hannibal2.skyhanni.data.repo.RepoManager
import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.events.PreInitFinishedEvent
-import at.hannibal2.skyhanni.features.anvil.AnvilCombineHelper
-import at.hannibal2.skyhanni.features.bingo.BingoAPI
-import at.hannibal2.skyhanni.features.bingo.CompactBingoChat
-import at.hannibal2.skyhanni.features.bingo.MinionCraftHelper
-import at.hannibal2.skyhanni.features.bingo.card.BingoCardDisplay
-import at.hannibal2.skyhanni.features.bingo.card.BingoCardReader
-import at.hannibal2.skyhanni.features.bingo.card.BingoCardTips
-import at.hannibal2.skyhanni.features.bingo.card.nextstephelper.BingoNextStepHelper
-import at.hannibal2.skyhanni.features.chat.ArachneChatMessageHider
-import at.hannibal2.skyhanni.features.chat.ChatFilter
-import at.hannibal2.skyhanni.features.chat.CompactBestiaryChatMessage
-import at.hannibal2.skyhanni.features.chat.CompactSplashPotionMessage
-import at.hannibal2.skyhanni.features.chat.PlayerDeathMessages
-import at.hannibal2.skyhanni.features.chat.RareDropMessages
-import at.hannibal2.skyhanni.features.chat.SkyblockXPInChat
+import at.hannibal2.skyhanni.events.utils.PreInitFinishedEvent
import at.hannibal2.skyhanni.features.chat.Translator
-import at.hannibal2.skyhanni.features.chat.WatchdogHider
-import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter
-import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatModifier
-import at.hannibal2.skyhanni.features.chroma.ChromaManager
-import at.hannibal2.skyhanni.features.combat.BestiaryData
-import at.hannibal2.skyhanni.features.combat.FerocityDisplay
-import at.hannibal2.skyhanni.features.combat.FlareDisplay
-import at.hannibal2.skyhanni.features.combat.HideDamageSplash
-import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
-import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker
-import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostCounter
-import at.hannibal2.skyhanni.features.combat.mobs.AreaMiniBossFeatures
-import at.hannibal2.skyhanni.features.combat.mobs.AshfangMinisNametagHider
-import at.hannibal2.skyhanni.features.combat.mobs.MobHighlight
-import at.hannibal2.skyhanni.features.combat.mobs.SpawnTimers
-import at.hannibal2.skyhanni.features.commands.PartyChatCommands
-import at.hannibal2.skyhanni.features.commands.PartyCommands
-import at.hannibal2.skyhanni.features.commands.SendCoordinatedCommand
-import at.hannibal2.skyhanni.features.commands.ViewRecipeCommand
-import at.hannibal2.skyhanni.features.commands.WarpIsCommand
-import at.hannibal2.skyhanni.features.commands.WikiManager
-import at.hannibal2.skyhanni.features.commands.tabcomplete.GetFromSacksTabComplete
-import at.hannibal2.skyhanni.features.commands.tabcomplete.PlayerTabComplete
-import at.hannibal2.skyhanni.features.commands.tabcomplete.TabComplete
-import at.hannibal2.skyhanni.features.commands.tabcomplete.WarpTabComplete
-import at.hannibal2.skyhanni.features.cosmetics.ArrowTrail
-import at.hannibal2.skyhanni.features.cosmetics.CosmeticFollowingLine
-import at.hannibal2.skyhanni.features.dungeon.CroesusChestTracker
-import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
-import at.hannibal2.skyhanni.features.dungeon.DungeonArchitectFeatures
-import at.hannibal2.skyhanni.features.dungeon.DungeonBossHideDamageSplash
-import at.hannibal2.skyhanni.features.dungeon.DungeonBossMessages
-import at.hannibal2.skyhanni.features.dungeon.DungeonChatFilter
-import at.hannibal2.skyhanni.features.dungeon.DungeonCleanEnd
-import at.hannibal2.skyhanni.features.dungeon.DungeonCopilot
-import at.hannibal2.skyhanni.features.dungeon.DungeonDeathCounter
-import at.hannibal2.skyhanni.features.dungeon.DungeonFinderFeatures
-import at.hannibal2.skyhanni.features.dungeon.DungeonHideItems
-import at.hannibal2.skyhanni.features.dungeon.DungeonHighlightClickedBlocks
-import at.hannibal2.skyhanni.features.dungeon.DungeonLividFinder
-import at.hannibal2.skyhanni.features.dungeon.DungeonMilestonesDisplay
-import at.hannibal2.skyhanni.features.dungeon.DungeonRankTabListColor
-import at.hannibal2.skyhanni.features.dungeon.DungeonShadowAssassinNotification
-import at.hannibal2.skyhanni.features.dungeon.DungeonTeammateOutlines
-import at.hannibal2.skyhanni.features.dungeon.DungeonsRaceGuide
-import at.hannibal2.skyhanni.features.dungeon.HighlightDungeonDeathmite
-import at.hannibal2.skyhanni.features.dungeon.TerracottaPhase
-import at.hannibal2.skyhanni.features.event.UniqueGiftingOpportunitiesFeatures
-import at.hannibal2.skyhanni.features.event.diana.AllBurrowsList
-import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper
-import at.hannibal2.skyhanni.features.event.diana.DianaAPI
-import at.hannibal2.skyhanni.features.event.diana.DianaFixChat
-import at.hannibal2.skyhanni.features.event.diana.DianaProfitTracker
-import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowHelper
-import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowParticleFinder
-import at.hannibal2.skyhanni.features.event.diana.GriffinPetWarning
-import at.hannibal2.skyhanni.features.event.diana.HighlightInquisitors
-import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare
-import at.hannibal2.skyhanni.features.event.diana.MythologicalCreatureTracker
-import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionData
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggDisplayManager
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggLocator
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsShared
-import at.hannibal2.skyhanni.features.event.hoppity.HoppityNpc
-import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries
-import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker
-import at.hannibal2.skyhanni.features.event.lobby.waypoints.christmas.PresentWaypoints
-import at.hannibal2.skyhanni.features.event.lobby.waypoints.easter.EasterEggWaypoints
-import at.hannibal2.skyhanni.features.event.lobby.waypoints.halloween.BasketWaypoints
-import at.hannibal2.skyhanni.features.event.spook.TheGreatSpook
-import at.hannibal2.skyhanni.features.event.winter.JyrreTimer
-import at.hannibal2.skyhanni.features.event.winter.NewYearCakeReminder
-import at.hannibal2.skyhanni.features.event.winter.UniqueGiftCounter
-import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder
-import at.hannibal2.skyhanni.features.fame.CityProjectFeatures
-import at.hannibal2.skyhanni.features.fishing.ChumBucketHider
-import at.hannibal2.skyhanni.features.fishing.FishingAPI
-import at.hannibal2.skyhanni.features.fishing.FishingBaitWarnings
-import at.hannibal2.skyhanni.features.fishing.FishingHookDisplay
-import at.hannibal2.skyhanni.features.fishing.FishingTimer
-import at.hannibal2.skyhanni.features.fishing.IsFishingDetection
-import at.hannibal2.skyhanni.features.fishing.SeaCreatureFeatures
-import at.hannibal2.skyhanni.features.fishing.SeaCreatureManager
-import at.hannibal2.skyhanni.features.fishing.SeaCreatureMessageShortener
-import at.hannibal2.skyhanni.features.fishing.SharkFishCounter
-import at.hannibal2.skyhanni.features.fishing.ShowFishingItemName
-import at.hannibal2.skyhanni.features.fishing.ThunderSparksHighlight
-import at.hannibal2.skyhanni.features.fishing.TotemOfCorruption
-import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker
-import at.hannibal2.skyhanni.features.fishing.tracker.SeaCreatureTracker
-import at.hannibal2.skyhanni.features.fishing.trophy.GeyserFishing
-import at.hannibal2.skyhanni.features.fishing.trophy.OdgerWaypoint
-import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishDisplay
-import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishFillet
-import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager
-import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishMessages
-import at.hannibal2.skyhanni.features.garden.AnitaMedalProfit
-import at.hannibal2.skyhanni.features.garden.AtmosphericFilterDisplay
-import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay
-import at.hannibal2.skyhanni.features.garden.GardenAPI
-import at.hannibal2.skyhanni.features.garden.GardenCropMilestoneFix
-import at.hannibal2.skyhanni.features.garden.GardenLevelDisplay
-import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest
-import at.hannibal2.skyhanni.features.garden.GardenOptimalSpeed
-import at.hannibal2.skyhanni.features.garden.GardenPlotAPI
-import at.hannibal2.skyhanni.features.garden.GardenPlotBorders
-import at.hannibal2.skyhanni.features.garden.GardenWarpCommands
-import at.hannibal2.skyhanni.features.garden.GardenYawAndPitch
-import at.hannibal2.skyhanni.features.garden.SensitivityReducer
-import at.hannibal2.skyhanni.features.garden.ToolTooltipTweaks
-import at.hannibal2.skyhanni.features.garden.composter.ComposterDisplay
-import at.hannibal2.skyhanni.features.garden.composter.ComposterInventoryNumbers
-import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay
-import at.hannibal2.skyhanni.features.garden.composter.GardenComposterInventoryFeatures
-import at.hannibal2.skyhanni.features.garden.contest.FarmingContestAPI
-import at.hannibal2.skyhanni.features.garden.contest.JacobContestFFNeededDisplay
-import at.hannibal2.skyhanni.features.garden.contest.JacobContestStatsSummary
-import at.hannibal2.skyhanni.features.garden.contest.JacobContestTimeNeeded
-import at.hannibal2.skyhanni.features.garden.contest.JacobFarmingContestsInventory
-import at.hannibal2.skyhanni.features.garden.farming.ArmorDropTracker
-import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay
-import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter
-import at.hannibal2.skyhanni.features.garden.farming.DicerRngDropTracker
import at.hannibal2.skyhanni.features.garden.farming.FarmingWeightDisplay
-import at.hannibal2.skyhanni.features.garden.farming.GardenBestCropTime
-import at.hannibal2.skyhanni.features.garden.farming.GardenBurrowingSporesNotifier
-import at.hannibal2.skyhanni.features.garden.farming.GardenCropMilestoneDisplay
-import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed
-import at.hannibal2.skyhanni.features.garden.farming.GardenCustomKeybinds
-import at.hannibal2.skyhanni.features.garden.farming.GardenStartLocation
-import at.hannibal2.skyhanni.features.garden.farming.WildStrawberryDyeNotification
-import at.hannibal2.skyhanni.features.garden.farming.WrongFungiCutterWarning
-import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneAPI
-import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneCreator
-import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneFeatures
-import at.hannibal2.skyhanni.features.garden.fortuneguide.CaptureFarmingGear
-import at.hannibal2.skyhanni.features.garden.inventory.AnitaExtraFarmingFortune
-import at.hannibal2.skyhanni.features.garden.inventory.GardenCropMilestoneInventory
-import at.hannibal2.skyhanni.features.garden.inventory.GardenInventoryNumbers
-import at.hannibal2.skyhanni.features.garden.inventory.GardenInventoryTooltipOverflow
-import at.hannibal2.skyhanni.features.garden.inventory.LogBookStats
-import at.hannibal2.skyhanni.features.garden.inventory.SkyMartCopperPrice
-import at.hannibal2.skyhanni.features.garden.inventory.plots.GardenNextPlotPrice
-import at.hannibal2.skyhanni.features.garden.inventory.plots.GardenPlotIcon
-import at.hannibal2.skyhanni.features.garden.inventory.plots.GardenPlotMenuHighlighting
-import at.hannibal2.skyhanni.features.garden.pests.PestAPI
-import at.hannibal2.skyhanni.features.garden.pests.PestFinder
-import at.hannibal2.skyhanni.features.garden.pests.PestParticleLine
-import at.hannibal2.skyhanni.features.garden.pests.PestParticleWaypoint
-import at.hannibal2.skyhanni.features.garden.pests.PestProfitTracker
-import at.hannibal2.skyhanni.features.garden.pests.PestSpawn
-import at.hannibal2.skyhanni.features.garden.pests.PestSpawnTimer
-import at.hannibal2.skyhanni.features.garden.pests.SprayDisplay
-import at.hannibal2.skyhanni.features.garden.pests.SprayFeatures
-import at.hannibal2.skyhanni.features.garden.pests.StereoHarmonyDisplay
-import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames
-import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics
-import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures
-import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorSupercraft
-import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorTimer
-import at.hannibal2.skyhanni.features.garden.visitor.HighlightVisitorsOutsideOfGarden
-import at.hannibal2.skyhanni.features.garden.visitor.NPCVisitorFix
-import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI
-import at.hannibal2.skyhanni.features.garden.visitor.VisitorListener
-import at.hannibal2.skyhanni.features.garden.visitor.VisitorRewardWarning
-import at.hannibal2.skyhanni.features.gui.MovableHotBar
-import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
-import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
-import at.hannibal2.skyhanni.features.gui.quiver.QuiverDisplay
-import at.hannibal2.skyhanni.features.gui.quiver.QuiverWarning
-import at.hannibal2.skyhanni.features.inventory.AuctionOutbidWarning
-import at.hannibal2.skyhanni.features.inventory.AuctionsHighlighter
-import at.hannibal2.skyhanni.features.inventory.ChestValue
-import at.hannibal2.skyhanni.features.inventory.DojoRankDisplay
-import at.hannibal2.skyhanni.features.inventory.HarpFeatures
-import at.hannibal2.skyhanni.features.inventory.HeldTimeInLore
-import at.hannibal2.skyhanni.features.inventory.HideNotClickableItems
-import at.hannibal2.skyhanni.features.inventory.HighlightBonzoMasks
-import at.hannibal2.skyhanni.features.inventory.ItemDisplayOverlayFeatures
-import at.hannibal2.skyhanni.features.inventory.ItemStars
-import at.hannibal2.skyhanni.features.inventory.MaxPurseItems
-import at.hannibal2.skyhanni.features.inventory.PowerStoneGuideFeatures
-import at.hannibal2.skyhanni.features.inventory.QuickCraftFeatures
-import at.hannibal2.skyhanni.features.inventory.RngMeterInventory
-import at.hannibal2.skyhanni.features.inventory.SackDisplay
-import at.hannibal2.skyhanni.features.inventory.ShiftClickBrewing
-import at.hannibal2.skyhanni.features.inventory.ShiftClickEquipment
-import at.hannibal2.skyhanni.features.inventory.ShiftClickNPCSell
-import at.hannibal2.skyhanni.features.inventory.SkyblockGuideHighlightFeature
-import at.hannibal2.skyhanni.features.inventory.StatsTuning
-import at.hannibal2.skyhanni.features.inventory.SuperCraftFeatures
-import at.hannibal2.skyhanni.features.inventory.SuperpairsClicksAlert
-import at.hannibal2.skyhanni.features.inventory.UltraRareBookAlert
-import at.hannibal2.skyhanni.features.inventory.auctionhouse.AuctionHouseCopyUnderbidPrice
-import at.hannibal2.skyhanni.features.inventory.auctionhouse.AuctionHouseOpenPriceWebsite
-import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi
-import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarBestSellMethod
-import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarCancelledBuyOrderClipboard
-import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarOpenPriceWebsite
-import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarOrderHelper
-import at.hannibal2.skyhanni.features.inventory.bazaar.CraftMaterialsFromBazaar
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryBarnManager
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryCustomReminder
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryDataLoader
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryInventory
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryKeybinds
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryShortcut
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryStats
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTimeTowerManager
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltip
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltipCompact
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryUpgradeWarning
-import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateShopPrice
-import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayHelper
-import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayWaypoints
-import at.hannibal2.skyhanni.features.itemabilities.ChickenHeadTimer
-import at.hannibal2.skyhanni.features.itemabilities.FireVeilWandParticles
-import at.hannibal2.skyhanni.features.itemabilities.abilitycooldown.ItemAbilityCooldown
-import at.hannibal2.skyhanni.features.mining.ColdOverlay
-import at.hannibal2.skyhanni.features.mining.DeepCavernsGuide
-import at.hannibal2.skyhanni.features.mining.GoldenGoblinHighlight
-import at.hannibal2.skyhanni.features.mining.HighlightMiningCommissionMobs
-import at.hannibal2.skyhanni.features.mining.HotmFeatures
-import at.hannibal2.skyhanni.features.mining.KingTalismanHelper
-import at.hannibal2.skyhanni.features.mining.MiningCommissionsBlocksColor
-import at.hannibal2.skyhanni.features.mining.MiningNotifications
-import at.hannibal2.skyhanni.features.mining.TunnelsMaps
-import at.hannibal2.skyhanni.features.mining.crystalhollows.CrystalHollowsNamesInCore
-import at.hannibal2.skyhanni.features.mining.crystalhollows.CrystalHollowsWalls
-import at.hannibal2.skyhanni.features.mining.eventtracker.MiningEventDisplay
-import at.hannibal2.skyhanni.features.mining.eventtracker.MiningEventTracker
-import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTracker
-import at.hannibal2.skyhanni.features.mining.fossilexcavator.FossilExcavatorAPI
-import at.hannibal2.skyhanni.features.mining.fossilexcavator.GlacitePowderFeatures
-import at.hannibal2.skyhanni.features.mining.fossilexcavator.ProfitPerExcavation
-import at.hannibal2.skyhanni.features.mining.fossilexcavator.solver.FossilSolverDisplay
-import at.hannibal2.skyhanni.features.mining.glacitemineshaft.CorpseLocator
-import at.hannibal2.skyhanni.features.mining.glacitemineshaft.MineshaftWaypoints
-import at.hannibal2.skyhanni.features.mining.mineshaft.CorpseAPI
-import at.hannibal2.skyhanni.features.mining.mineshaft.MineshaftCorpseProfitPer
-import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker
-import at.hannibal2.skyhanni.features.minion.InfernoMinionFeatures
-import at.hannibal2.skyhanni.features.minion.MinionCollectLogic
-import at.hannibal2.skyhanni.features.minion.MinionFeatures
-import at.hannibal2.skyhanni.features.minion.MinionXp
-import at.hannibal2.skyhanni.features.misc.AuctionHousePriceComparison
-import at.hannibal2.skyhanni.features.misc.BetterSignEditing
-import at.hannibal2.skyhanni.features.misc.BetterWikiFromMenus
-import at.hannibal2.skyhanni.features.misc.BrewingStandOverlay
-import at.hannibal2.skyhanni.features.misc.ButtonOnPause
import at.hannibal2.skyhanni.features.misc.CollectionTracker
-import at.hannibal2.skyhanni.features.misc.ContributorManager
-import at.hannibal2.skyhanni.features.misc.CopyPlaytime
-import at.hannibal2.skyhanni.features.misc.CurrentPetDisplay
-import at.hannibal2.skyhanni.features.misc.CustomTextBox
-import at.hannibal2.skyhanni.features.misc.ExpOrbsOnGroundHider
-import at.hannibal2.skyhanni.features.misc.FixGhostEntities
-import at.hannibal2.skyhanni.features.misc.FixNEUHeavyPearls
-import at.hannibal2.skyhanni.features.misc.HideArmor
-import at.hannibal2.skyhanni.features.misc.HideFarEntities
-import at.hannibal2.skyhanni.features.misc.InGameDateDisplay
-import at.hannibal2.skyhanni.features.misc.InWaterDisplay
-import at.hannibal2.skyhanni.features.misc.JoinCrystalHollows
-import at.hannibal2.skyhanni.features.misc.LesserOrbHider
-import at.hannibal2.skyhanni.features.misc.LockMouseLook
-import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
-import at.hannibal2.skyhanni.features.misc.MiscFeatures
-import at.hannibal2.skyhanni.features.misc.MovementSpeedDisplay
-import at.hannibal2.skyhanni.features.misc.NoBitsWarning
-import at.hannibal2.skyhanni.features.misc.NonGodPotEffectDisplay
-import at.hannibal2.skyhanni.features.misc.ParticleHider
-import at.hannibal2.skyhanni.features.misc.PartyMemberOutlines
-import at.hannibal2.skyhanni.features.misc.PatcherSendCoordinates
-import at.hannibal2.skyhanni.features.misc.PetCandyUsedDisplay
-import at.hannibal2.skyhanni.features.misc.PetExpTooltip
-import at.hannibal2.skyhanni.features.misc.PetItemDisplay
-import at.hannibal2.skyhanni.features.misc.PocketSackInASackDisplay
-import at.hannibal2.skyhanni.features.misc.PrivateIslandNoPickaxeAbility
-import at.hannibal2.skyhanni.features.misc.QuickModMenuSwitch
-import at.hannibal2.skyhanni.features.misc.ReplaceRomanNumerals
-import at.hannibal2.skyhanni.features.misc.RestorePieceOfWizardPortalLore
-import at.hannibal2.skyhanni.features.misc.ServerRestartTitle
-import at.hannibal2.skyhanni.features.misc.SkyBlockKickDuration
-import at.hannibal2.skyhanni.features.misc.TabWidgetSettings
-import at.hannibal2.skyhanni.features.misc.TimeFeatures
-import at.hannibal2.skyhanni.features.misc.TpsCounter
-import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList
-import at.hannibal2.skyhanni.features.misc.compacttablist.TabListReader
-import at.hannibal2.skyhanni.features.misc.compacttablist.TabListRenderer
-import at.hannibal2.skyhanni.features.misc.discordrpc.DiscordRPCManager
-import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue
-import at.hannibal2.skyhanni.features.misc.items.EstimatedWardrobePrice
-import at.hannibal2.skyhanni.features.misc.items.GlowingDroppedItems
-import at.hannibal2.skyhanni.features.misc.items.enchants.EnchantParser
-import at.hannibal2.skyhanni.features.misc.limbo.LimboPlaytime
-import at.hannibal2.skyhanni.features.misc.limbo.LimboTimeTracker
-import at.hannibal2.skyhanni.features.misc.massconfiguration.DefaultConfigFeatures
-import at.hannibal2.skyhanni.features.misc.teleportpad.TeleportPadCompactName
-import at.hannibal2.skyhanni.features.misc.teleportpad.TeleportPadInventoryNumber
-import at.hannibal2.skyhanni.features.misc.trevor.TrevorFeatures
-import at.hannibal2.skyhanni.features.misc.trevor.TrevorSolver
-import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker
-import at.hannibal2.skyhanni.features.misc.update.UpdateManager
-import at.hannibal2.skyhanni.features.misc.visualwords.ModifyVisualWords
-import at.hannibal2.skyhanni.features.nether.MatriarchHelper
-import at.hannibal2.skyhanni.features.nether.PabloHelper
-import at.hannibal2.skyhanni.features.nether.SulphurSkitterBox
-import at.hannibal2.skyhanni.features.nether.VolcanoExplosivityDisplay
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangBlazes
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangBlazingSouls
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangFreezeCooldown
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangGravityOrbs
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangHideDamageIndicator
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangHideParticles
-import at.hannibal2.skyhanni.features.nether.ashfang.AshfangNextResetCooldown
-import at.hannibal2.skyhanni.features.nether.kuudra.KuudraAPI
import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper
-import at.hannibal2.skyhanni.features.rift.RiftAPI
-import at.hannibal2.skyhanni.features.rift.area.colosseum.BlobbercystsHighlight
-import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftAgaricusCap
-import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftWiltedBerberisHelper
-import at.hannibal2.skyhanni.features.rift.area.dreadfarm.VoltHighlighter
-import at.hannibal2.skyhanni.features.rift.area.livingcave.LivingCaveDefenseBlocks
-import at.hannibal2.skyhanni.features.rift.area.livingcave.LivingCaveLivingMetalHelper
-import at.hannibal2.skyhanni.features.rift.area.livingcave.LivingMetalSuitProgress
-import at.hannibal2.skyhanni.features.rift.area.mirrorverse.DanceRoomHelper
-import at.hannibal2.skyhanni.features.rift.area.mirrorverse.RiftLavaMazeParkour
-import at.hannibal2.skyhanni.features.rift.area.mirrorverse.RiftUpsideDownParkour
-import at.hannibal2.skyhanni.features.rift.area.mirrorverse.TubulatorParkour
-import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies
-import at.hannibal2.skyhanni.features.rift.area.westvillage.VerminHighlighter
-import at.hannibal2.skyhanni.features.rift.area.westvillage.VerminTracker
-import at.hannibal2.skyhanni.features.rift.area.westvillage.kloon.KloonHacking
-import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftLarva
-import at.hannibal2.skyhanni.features.rift.area.wyldwoods.RiftOdonata
-import at.hannibal2.skyhanni.features.rift.area.wyldwoods.ShyCruxWarnings
-import at.hannibal2.skyhanni.features.rift.everywhere.CruxTalismanDisplay
-import at.hannibal2.skyhanni.features.rift.everywhere.EnigmaSoulWaypoints
-import at.hannibal2.skyhanni.features.rift.everywhere.HighlightRiftGuide
-import at.hannibal2.skyhanni.features.rift.everywhere.RiftHorsezookaHider
-import at.hannibal2.skyhanni.features.rift.everywhere.RiftTimer
-import at.hannibal2.skyhanni.features.rift.everywhere.motes.RiftMotesOrb
-import at.hannibal2.skyhanni.features.rift.everywhere.motes.ShowMotesNpcSellPrice
-import at.hannibal2.skyhanni.features.skillprogress.SkillProgress
-import at.hannibal2.skyhanni.features.skillprogress.SkillTooltip
-import at.hannibal2.skyhanni.features.slayer.HideMobNames
-import at.hannibal2.skyhanni.features.slayer.SlayerBossSpawnSoon
-import at.hannibal2.skyhanni.features.slayer.SlayerItemsOnGround
-import at.hannibal2.skyhanni.features.slayer.SlayerMiniBossFeatures
-import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker
-import at.hannibal2.skyhanni.features.slayer.SlayerQuestWarning
-import at.hannibal2.skyhanni.features.slayer.SlayerRngMeterDisplay
-import at.hannibal2.skyhanni.features.slayer.VampireSlayerFeatures
-import at.hannibal2.skyhanni.features.slayer.blaze.BlazeSlayerClearView
-import at.hannibal2.skyhanni.features.slayer.blaze.BlazeSlayerDaggerHelper
-import at.hannibal2.skyhanni.features.slayer.blaze.BlazeSlayerFirePitsWarning
-import at.hannibal2.skyhanni.features.slayer.blaze.FirePillarDisplay
-import at.hannibal2.skyhanni.features.slayer.blaze.HellionShieldHelper
-import at.hannibal2.skyhanni.features.slayer.enderman.EndermanSlayerFeatures
-import at.hannibal2.skyhanni.features.slayer.enderman.EndermanSlayerHideParticles
-import at.hannibal2.skyhanni.features.stranded.HighlightPlaceableNpcs
-import at.hannibal2.skyhanni.features.summonings.SummoningMobManager
-import at.hannibal2.skyhanni.features.summonings.SummoningSoulsName
-import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.skyhannimodule.LoadedModules
-import at.hannibal2.skyhanni.test.HighlightMissingRepoItems
-import at.hannibal2.skyhanni.test.PacketTest
-import at.hannibal2.skyhanni.test.ParkourWaypointSaver
-import at.hannibal2.skyhanni.test.ShowItemUuid
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
-import at.hannibal2.skyhanni.test.TestBingo
-import at.hannibal2.skyhanni.test.TestCopyBestiaryValues
-import at.hannibal2.skyhanni.test.TestCopyRngMeterValues
-import at.hannibal2.skyhanni.test.TestExportTools
-import at.hannibal2.skyhanni.test.TestShowSlotNumber
-import at.hannibal2.skyhanni.test.WorldEdit
import at.hannibal2.skyhanni.test.command.ErrorManager
-import at.hannibal2.skyhanni.test.command.TrackParticlesCommand
-import at.hannibal2.skyhanni.test.command.TrackSoundsCommand
import at.hannibal2.skyhanni.test.hotswap.HotswapSupport
-import at.hannibal2.skyhanni.utils.ChatUtils
-import at.hannibal2.skyhanni.utils.EntityOutlineRenderer
-import at.hannibal2.skyhanni.utils.EntityUtils
-import at.hannibal2.skyhanni.utils.KeyboardManager
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.MinecraftConsoleFilter.Companion.initLogging
-import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NEUVersionCheck.checkIfNeuIsLoaded
-import at.hannibal2.skyhanni.utils.TabListData
-import at.hannibal2.skyhanni.utils.UtilsPatterns
-import at.hannibal2.skyhanni.utils.renderables.RenderableTooltips
-import at.hannibal2.skyhanni.utils.repopatterns.RepoPatternManager
import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
@@ -502,7 +48,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
- version = "0.26.Beta.6",
+ version = "0.26.Beta.8",
)
class SkyHanniMod {
@@ -516,481 +62,23 @@ class SkyHanniMod {
LoadedModules.modules.forEach { loadModule(it) }
// data
- loadModule(PlayerChatManager())
- loadModule(PlayerNameFormatter())
loadModule(HypixelData())
- loadModule(LocationFixData)
- loadModule(DungeonAPI)
- loadModule(ScoreboardData())
- loadModule(SeaCreatureFeatures())
- loadModule(SeaCreatureManager())
- loadModule(MobData())
- loadModule(MobDetection())
- loadModule(EntityMovementData)
- loadModule(TestExportTools)
- loadModule(ItemClickData())
-// loadModule(Year300RaffleEvent)
- loadModule(MinecraftData)
- loadModule(TitleManager())
- loadModule(ItemTipHelper())
- loadModule(RenderLivingEntityHelper())
loadModule(SkillExperience())
- loadModule(OtherInventoryData)
- loadModule(TabListData)
- loadModule(RenderData())
- loadModule(GardenCropMilestones)
- loadModule(GardenCropMilestonesCommunityFix)
- loadModule(MovableHotBar())
- loadModule(GardenCropUpgrades)
- loadModule(VisitorListener())
- loadModule(VisitorRewardWarning())
- loadModule(OwnInventoryData())
- loadModule(ScreenData)
- loadModule(HighlightVisitorsOutsideOfGarden())
- loadModule(GuiEditManager())
- loadModule(GetFromSackAPI)
- loadModule(UpdateManager)
- loadModule(CropAccessoryData)
- loadModule(GardenComposterUpgradesData())
- loadModule(ActionBarStatsData)
- loadModule(GardenCropMilestoneInventory())
- loadModule(GardenCropSpeed)
- loadModule(GardenWarpCommands())
- loadModule(ProfileStorageData)
- loadModule(TitleData())
- loadModule(BlockData())
- loadModule(DefaultConfigFeatures)
- loadModule(EntityOutlineRenderer)
- loadModule(KeyboardManager)
- loadModule(AdvancedPlayerList)
- loadModule(ItemAddManager())
- loadModule(BingoCardReader())
- loadModule(DeepCavernsGuide())
- loadModule(DungeonsRaceGuide())
- loadModule(GardenBestCropTime())
- loadModule(ActionBarData)
- loadModule(TrackerManager)
- loadModule(ScoreboardPattern)
- loadModule(UtilsPatterns)
- loadModule(GuiData)
- loadModule(BossbarData)
- loadModule(EntityUtils)
- loadModule(ChatUtils)
- loadModule(FixedRateTimerManager())
- loadModule(ChromaManager)
- loadModule(TabWidget)
- loadModule(HotmData)
- loadModule(ContributorManager)
- loadModule(TabComplete)
- loadModule(HypixelBazaarFetcher)
- loadModule(EventCounter)
-
- // APIs
- loadModule(BazaarApi())
- loadModule(GardenAPI)
- loadModule(GardenPlotAPI)
- loadModule(DataWatcherAPI())
- loadModule(CollectionAPI)
- loadModule(FarmingContestAPI)
- loadModule(HighlightOnHoverSlot)
- loadModule(FriendAPI)
- loadModule(PartyAPI)
- loadModule(GuildAPI)
- loadModule(SlayerAPI)
- loadModule(PurseAPI)
- loadModule(RiftAPI)
- loadModule(SackAPI)
- loadModule(BingoAPI)
- loadModule(FameRanks)
- loadModule(FishingAPI)
- loadModule(MaxwellAPI)
- loadModule(QuiverAPI)
- loadModule(BitsAPI)
- loadModule(MayorAPI)
- loadModule(SkillAPI)
- loadModule(VisitorAPI)
- loadModule(KuudraAPI)
- loadModule(PetAPI)
- loadModule(IsFishingDetection)
- loadModule(LorenzUtils)
- loadModule(NEUItems)
- loadModule(PestAPI)
- loadModule(MiningAPI)
- loadModule(FossilExcavatorAPI)
- loadModule(ChocolateFactoryAPI)
- loadModule(RenderableTooltips)
- loadModule(DianaAPI)
// features
- loadModule(BazaarOrderHelper())
- loadModule(AuctionsHighlighter)
- loadModule(ChatFilter())
- loadModule(PlayerChatModifier())
- loadModule(DungeonChatFilter())
- loadModule(HideNotClickableItems())
- loadModule(ItemDisplayOverlayFeatures)
- loadModule(CurrentPetDisplay())
- loadModule(HideFarEntities())
- loadModule(ExpOrbsOnGroundHider())
- loadModule(BetterWikiFromMenus())
- loadModule(DamageIndicatorManager())
- loadModule(ItemAbilityCooldown())
- loadModule(DungeonHighlightClickedBlocks())
- loadModule(DungeonMilestonesDisplay)
- loadModule(DungeonDeathCounter())
- loadModule(DungeonCleanEnd())
- loadModule(TunnelsMaps())
- loadModule(DungeonBossMessages())
- loadModule(DungeonBossHideDamageSplash())
- loadModule(UniqueGiftingOpportunitiesFeatures)
- loadModule(UniqueGiftCounter)
- loadModule(TrophyFishManager)
- loadModule(TrophyFishFillet())
- loadModule(TrophyFishMessages())
- loadModule(GeyserFishing())
- loadModule(BazaarBestSellMethod())
- loadModule(ShiftClickBrewing())
- loadModule(BazaarOpenPriceWebsite())
- loadModule(AuctionHouseCopyUnderbidPrice())
- loadModule(AuctionHouseOpenPriceWebsite())
- loadModule(AnvilCombineHelper())
- loadModule(SeaCreatureMessageShortener())
- loadModule(AshfangFreezeCooldown)
- loadModule(AshfangNextResetCooldown())
- loadModule(CrystalHollowsWalls())
- loadModule(SummoningSoulsName())
- loadModule(AshfangGravityOrbs())
- loadModule(AshfangBlazingSouls())
- loadModule(AshfangBlazes())
- loadModule(AshfangHideParticles())
- loadModule(AshfangHideDamageIndicator())
- loadModule(ItemStars())
- loadModule(MinionFeatures)
- loadModule(TimeFeatures())
- loadModule(RngMeterInventory())
- loadModule(WikiManager)
- loadModule(SendCoordinatedCommand())
- loadModule(WarpIsCommand())
- loadModule(ViewRecipeCommand)
- loadModule(PartyCommands)
- loadModule(PartyChatCommands)
- loadModule(SummoningMobManager())
- loadModule(SkyblockXPInChat())
- loadModule(AreaMiniBossFeatures())
- loadModule(MobHighlight())
- loadModule(ChocolateFactoryDataLoader)
- loadModule(ChocolateFactoryBarnManager)
- loadModule(ChocolateFactoryShortcut())
- loadModule(ChocolateFactoryInventory)
- loadModule(ChocolateFactoryStats)
- loadModule(ChocolateFactoryTooltipCompact)
- loadModule(ChocolateFactoryTimeTowerManager)
- loadModule(ChocolateFactoryTooltip)
- loadModule(ChocolateFactoryKeybinds)
- loadModule(ChocolateShopPrice)
- loadModule(ChocolateFactoryUpgradeWarning)
- loadModule(ChocolateFactoryCustomReminder)
- loadModule(HoppityNpc)
- loadModule(HoppityEggsManager)
- loadModule(HoppityEggLocator)
- loadModule(HoppityEggsShared)
- loadModule(HoppityEggDisplayManager)
- loadModule(HoppityCollectionData)
- loadModule(HoppityCollectionStats)
- loadModule(SpawnTimers())
- loadModule(MarkedPlayerManager())
- loadModule(SlayerMiniBossFeatures())
- loadModule(PlayerDeathMessages())
- loadModule(HighlightDungeonDeathmite())
- loadModule(DungeonHideItems())
- loadModule(DungeonCopilot())
- loadModule(DungeonArchitectFeatures())
- loadModule(EndermanSlayerFeatures())
- loadModule(FireVeilWandParticles())
- loadModule(HideMobNames())
- loadModule(HideDamageSplash())
- loadModule(FerocityDisplay())
- loadModule(FlareDisplay)
- loadModule(InGameDateDisplay())
- loadModule(ThunderSparksHighlight())
- loadModule(BlazeSlayerDaggerHelper())
- loadModule(HellionShieldHelper())
- loadModule(BlazeSlayerFirePitsWarning())
- loadModule(BlazeSlayerClearView())
- loadModule(FirePillarDisplay())
- loadModule(EndermanSlayerHideParticles())
- loadModule(PlayerChatFilter())
- loadModule(HideArmor())
- loadModule(SlayerQuestWarning())
- loadModule(StatsTuning())
- loadModule(NonGodPotEffectDisplay())
- loadModule(SoopyGuessBurrow())
- loadModule(HotmFeatures())
- loadModule(DianaProfitTracker)
- loadModule(DianaFixChat())
- loadModule(MythologicalCreatureTracker)
- loadModule(ShiftClickNPCSell)
- loadModule(HighlightJerries())
- loadModule(TheGreatSpook())
- loadModule(GriffinBurrowHelper)
- loadModule(AllBurrowsList)
- loadModule(GriffinBurrowParticleFinder)
- loadModule(BurrowWarpHelper())
loadModule(CollectionTracker())
- loadModule(HighlightBonzoMasks)
- loadModule(BazaarCancelledBuyOrderClipboard())
- loadModule(CompactSplashPotionMessage())
- loadModule(CroesusChestTracker())
- loadModule(CompactBingoChat())
- loadModule(BrewingStandOverlay())
- loadModule(FishingTimer())
- loadModule(MatriarchHelper())
- loadModule(LesserOrbHider())
- loadModule(FishingHookDisplay())
loadModule(CrimsonIsleReputationHelper(this))
- loadModule(SkyblockGuideHighlightFeature)
- loadModule(SharkFishCounter())
- loadModule(PowerStoneGuideFeatures())
- loadModule(OdgerWaypoint())
- loadModule(TrophyFishDisplay)
- loadModule(TiaRelayHelper())
- loadModule(TiaRelayWaypoints())
- loadModule(BasketWaypoints())
- loadModule(EasterEggWaypoints())
- loadModule(BingoCardDisplay())
- loadModule(BingoNextStepHelper())
- loadModule(MinionCraftHelper())
- loadModule(TpsCounter())
- loadModule(ParticleHider())
- loadModule(MiscFeatures)
- loadModule(ReplaceRomanNumerals())
- loadModule(GardenPlotMenuHighlighting())
- loadModule(SkyMartCopperPrice())
- loadModule(GardenVisitorFeatures)
- loadModule(GardenVisitorSupercraft())
- loadModule(NPCVisitorFix)
- loadModule(GardenInventoryNumbers())
- loadModule(GardenVisitorTimer())
- loadModule(MinionXp())
- loadModule(GardenNextPlotPrice())
- loadModule(GardenCropMilestoneDisplay)
- loadModule(GardenCustomKeybinds)
- loadModule(ChickenHeadTimer())
- loadModule(FossilSolverDisplay)
- loadModule(ExcavatorProfitTracker())
- loadModule(ProfitPerExcavation())
- loadModule(GlacitePowderFeatures())
- loadModule(MineshaftCorpseProfitPer())
- loadModule(MineshaftWaypoints)
- loadModule(CorpseLocator)
- loadModule(CorpseAPI())
- loadModule(GardenOptimalSpeed())
- loadModule(GardenLevelDisplay())
loadModule(FarmingWeightDisplay())
- loadModule(DicerRngDropTracker)
- loadModule(PrivateIslandNoPickaxeAbility())
- loadModule(CropMoneyDisplay)
- loadModule(JacobFarmingContestsInventory())
- loadModule(GardenNextJacobContest)
- loadModule(WrongFungiCutterWarning())
- loadModule(ArmorDropTracker)
- loadModule(FarmingLaneAPI)
- loadModule(FarmingLaneFeatures)
- loadModule(FarmingLaneCreator)
- loadModule(JoinCrystalHollows())
- loadModule(CrystalHollowsNamesInCore())
- loadModule(GardenVisitorColorNames)
- loadModule(TeleportPadCompactName())
- loadModule(AnitaMedalProfit())
- loadModule(AtmosphericFilterDisplay())
- loadModule(AnitaExtraFarmingFortune())
- loadModule(ComposterDisplay())
- loadModule(GardenComposterInventoryFeatures())
- loadModule(MinionCollectLogic())
- loadModule(BetterSignEditing())
- loadModule(PatcherSendCoordinates())
- loadModule(PetItemDisplay())
- loadModule(EstimatedItemValue)
- loadModule(EstimatedWardrobePrice())
- loadModule(ComposterInventoryNumbers())
- loadModule(FarmingFortuneDisplay)
- loadModule(ToolTooltipTweaks())
- loadModule(CropSpeedMeter())
- loadModule(AshfangMinisNametagHider())
- loadModule(TeleportPadInventoryNumber())
- loadModule(ComposterOverlay)
- loadModule(DiscordRPCManager)
- loadModule(GardenCropMilestoneFix())
- loadModule(GardenBurrowingSporesNotifier())
- loadModule(WildStrawberryDyeNotification())
- loadModule(JacobContestFFNeededDisplay())
- loadModule(JacobContestTimeNeeded())
- loadModule(JacobContestStatsSummary())
- loadModule(GardenYawAndPitch())
- loadModule(MovementSpeedDisplay())
- loadModule(ChumBucketHider())
- loadModule(InquisitorWaypointShare)
- loadModule(TrevorFeatures)
- loadModule(TrevorSolver)
- loadModule(TrevorTracker)
- loadModule(BingoCardTips())
- loadModule(GardenVisitorDropStatistics)
- loadModule(CaptureFarmingGear)
- loadModule(SackDisplay)
- loadModule(GardenStartLocation)
- loadModule(PetCandyUsedDisplay())
- loadModule(ServerRestartTitle)
- loadModule(CityProjectFeatures())
- loadModule(GardenPlotIcon)
- loadModule(GardenPlotBorders)
- loadModule(LogBookStats())
- loadModule(PocketSackInASackDisplay())
- loadModule(ShowFishingItemName())
- loadModule(WarpTabComplete)
- loadModule(PlayerTabComplete)
- loadModule(GetFromSacksTabComplete)
- loadModule(SlayerProfitTracker)
- loadModule(FishingProfitTracker)
- loadModule(SeaCreatureTracker)
- loadModule(SlayerItemsOnGround())
- loadModule(RestorePieceOfWizardPortalLore())
- loadModule(QuickModMenuSwitch)
- loadModule(ArachneChatMessageHider())
- loadModule(ShowItemUuid())
- loadModule(FrozenTreasureTracker)
- loadModule(MiningEventDisplay)
- loadModule(MiningCommissionsBlocksColor)
- loadModule(SlayerRngMeterDisplay())
- loadModule(GhostCounter)
- loadModule(RiftTimer())
- loadModule(HighlightRiftGuide())
- loadModule(ShyCruxWarnings())
- loadModule(RiftLarva())
- loadModule(VoltHighlighter())
- loadModule(RiftOdonata())
- loadModule(RiftAgaricusCap())
- loadModule(KloonHacking())
- loadModule(EnigmaSoulWaypoints)
- loadModule(DungeonLividFinder)
- loadModule(CruxTalismanDisplay)
- loadModule(DanceRoomHelper)
- loadModule(TubulatorParkour())
- loadModule(CustomTextBox())
- loadModule(RiftUpsideDownParkour())
- loadModule(RiftLavaMazeParkour())
- loadModule(HighlightMiningCommissionMobs())
- loadModule(ShowMotesNpcSellPrice())
- loadModule(LivingMetalSuitProgress())
- loadModule(VampireSlayerFeatures)
- loadModule(BlobbercystsHighlight())
- loadModule(LivingCaveDefenseBlocks())
- loadModule(LivingCaveLivingMetalHelper())
- loadModule(RiftMotesOrb())
- loadModule(ChestValue())
- loadModule(SlayerBossSpawnSoon())
- loadModule(RiftBloodEffigies)
- loadModule(RiftWiltedBerberisHelper())
- loadModule(RiftHorsezookaHider())
- loadModule(GriffinPetWarning())
- loadModule(BestiaryData)
- loadModule(KingTalismanHelper())
- loadModule(HarpFeatures)
- loadModule(EnderNodeTracker)
- loadModule(CompactBestiaryChatMessage())
- loadModule(WatchdogHider())
- loadModule(AuctionHousePriceComparison())
- loadModule(AccountUpgradeReminder())
- loadModule(PetExpTooltip())
loadModule(Translator())
- loadModule(CosmeticFollowingLine())
- loadModule(SuperpairsClicksAlert())
- loadModule(UltraRareBookAlert)
- loadModule(PowderTracker)
- loadModule(ModifyVisualWords)
- loadModule(TabListReader)
- loadModule(TabListRenderer)
- loadModule(GlowingDroppedItems())
- loadModule(DungeonTeammateOutlines())
- loadModule(DungeonRankTabListColor())
- loadModule(TerracottaPhase())
- loadModule(VolcanoExplosivityDisplay())
- loadModule(FixNEUHeavyPearls())
- loadModule(QuickCraftFeatures())
- loadModule(SkyBlockKickDuration())
- loadModule(LimboTimeTracker)
- loadModule(PartyMemberOutlines())
- loadModule(ArrowTrail())
- loadModule(ShiftClickEquipment())
- loadModule(LockMouseLook)
- loadModule(SensitivityReducer)
- loadModule(DungeonFinderFeatures())
- loadModule(GoldenGoblinHighlight())
- loadModule(TabWidgetSettings())
- loadModule(EnchantParser)
- loadModule(PabloHelper())
- loadModule(FishingBaitWarnings())
- loadModule(CustomScoreboard())
- loadModule(RepoPatternManager)
- loadModule(PestSpawn())
- loadModule(PestSpawnTimer)
- loadModule(PestFinder)
- loadModule(PestParticleWaypoint())
- loadModule(StereoHarmonyDisplay())
- loadModule(PestParticleLine())
- loadModule(SprayFeatures())
- loadModule(DojoRankDisplay())
- loadModule(SprayDisplay())
- loadModule(HighlightPlaceableNpcs())
- loadModule(PresentWaypoints())
- loadModule(MiningEventTracker())
- loadModule(InWaterDisplay)
- loadModule(MiningNotifications)
- loadModule(JyrreTimer())
- loadModule(TotemOfCorruption())
- loadModule(NewYearCakeReminder())
- loadModule(SulphurSkitterBox())
- loadModule(HighlightInquisitors())
- loadModule(VerminTracker)
- loadModule(VerminHighlighter())
- loadModule(SkillProgress)
- loadModule(GardenInventoryTooltipOverflow())
- loadModule(SkillTooltip())
- loadModule(MaxPurseItems())
- loadModule(SuperCraftFeatures)
- loadModule(HeldTimeInLore)
- loadModule(InfernoMinionFeatures())
- loadModule(LimboPlaytime)
- loadModule(CopyPlaytime)
- loadModule(RareDropMessages())
- loadModule(CraftMaterialsFromBazaar())
- loadModule(DungeonShadowAssassinNotification())
- loadModule(PestProfitTracker)
- loadModule(NoBitsWarning)
- loadModule(ColdOverlay())
- loadModule(QuiverDisplay())
- loadModule(QuiverWarning())
- loadModule(AuctionOutbidWarning)
// test stuff
loadModule(SkyHanniDebugsAndTests())
- loadModule(FixGhostEntities)
- loadModule(TrackSoundsCommand)
- loadModule(TrackParticlesCommand)
- loadModule(ButtonOnPause())
- loadModule(PacketTest)
- loadModule(TestBingo)
- loadModule(TestCopyRngMeterValues)
- loadModule(TestCopyBestiaryValues)
- loadModule(HighlightMissingRepoItems())
- loadModule(ParkourWaypointSaver())
- loadModule(TestShowSlotNumber())
- loadModule(SkyHanniDebugsAndTests)
- loadModule(WorldEdit)
- loadModule(MobDebug())
+
+ SkyHanniEvents.init(modules)
Commands.init()
- PreInitFinishedEvent().postAndCatch()
+ PreInitFinishedEvent().post()
}
@Mod.EventHandler
@@ -1011,7 +99,7 @@ class SkyHanniMod {
loadedClasses.clear()
}
- private val loadedClasses = mutableSetOf()
+ private val loadedClasses = mutableSetOf()
fun loadModule(obj: Any) {
if (!loadedClasses.add(obj.javaClass.name)) throw IllegalStateException("Module ${obj.javaClass.name} is already loaded")
diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
index 22e22c423e71..3e7e1f7bf964 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.CollectionUpdateEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.ItemAddEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -19,6 +20,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object CollectionAPI {
private val patternGroup = RepoPattern.group("data.collection.api")
private val counterPattern by patternGroup.pattern(
@@ -87,7 +89,7 @@ object CollectionAPI {
@SubscribeEvent
fun onItemAdd(event: ItemAddEvent) {
val internalName = event.internalName
- val (_, amount) = NEUItems.getMultiplier(internalName)
+ val amount = NEUItems.getPrimitiveMultiplier(internalName).amount
if (amount > 1) return
// TODO add support for replenish (higher collection than actual items in inv)
diff --git a/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt
index 4eb107554791..94931dd8caf8 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt
@@ -2,9 +2,11 @@ package at.hannibal2.skyhanni.api
import at.hannibal2.skyhanni.events.DataWatcherUpdatedEvent
import at.hannibal2.skyhanni.events.EntityCustomNameUpdateEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class DataWatcherAPI {
+@SkyHanniModule
+object DataWatcherAPI {
private val DATA_VALUE_CUSTOM_NAME = 2
diff --git a/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt b/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt
new file mode 100644
index 000000000000..c2b1571f4792
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt
@@ -0,0 +1,22 @@
+package at.hannibal2.skyhanni.api
+
+import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent
+import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import net.minecraftforge.event.entity.EntityJoinWorldEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import net.minecraftforge.fml.common.network.FMLNetworkEvent
+
+@SkyHanniModule
+object FmlEventApi {
+
+ @SubscribeEvent
+ fun onDisconnect(event: FMLNetworkEvent.ClientDisconnectionFromServerEvent) {
+ ClientDisconnectEvent().post()
+ }
+
+ @SubscribeEvent
+ fun onEntityJoinWorld(event: EntityJoinWorldEvent) {
+ EntityEnterWorldEvent(event.entity).post()
+ }
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
index 98160a372fa4..7f69e7318c31 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
@@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.events.MessageSendToServerEvent
import at.hannibal2.skyhanni.features.commands.tabcomplete.GetFromSacksTabComplete
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ChatUtils.isCommand
@@ -31,6 +32,7 @@ import java.util.Deque
import java.util.LinkedList
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object GetFromSackAPI {
private val config get() = SkyHanniMod.feature.inventory.gfs
@@ -58,7 +60,7 @@ object GetFromSackAPI {
text: String = "§lCLICK HERE§r§e to grab §ax${item.amount} §9${item.itemName}§e from sacks!",
) =
ChatUtils.clickableChat(text, onClick = {
- HypixelCommands.getFromSacks(item.internalName.asString(), item.amount)
+ getFromSack(item)
})
fun getFromSlotClickedSackItems(items: List, slotIndex: Int) = addToInventory(items, slotIndex)
@@ -89,7 +91,8 @@ object GetFromSackAPI {
if (!LorenzUtils.inSkyBlock) return
if (queue.isNotEmpty() && lastTimeOfCommand.passedSince() >= minimumDelay) {
val item = queue.poll()
- HypixelCommands.getFromSacks(item.internalName.asString().replace('-', ':'), item.amount)
+ // TODO find a better workaround
+ ChatUtils.sendMessageToServer("/gfs ${item.internalName.asString().replace('-', ':')} ${item.amount}")
lastTimeOfCommand = ChatUtils.getTimeWhenNewlyQueuedMessageGetsExecuted()
}
}
@@ -105,7 +108,7 @@ object GetFromSackAPI {
if (event.clickedButton != 1) return // filter none right clicks
addToQueue(inventoryMap[event.slotId] ?: return)
inventoryMap.remove(event.slotId)
- event.isCanceled = true
+ event.cancel()
}
@SubscribeEvent
@@ -128,11 +131,11 @@ object GetFromSackAPI {
queuedHandler(replacedEvent)
bazaarHandler(replacedEvent)
if (replacedEvent.isCanceled) {
- event.isCanceled = true
+ event.cancel()
return
}
if (replacedEvent !== event) {
- event.isCanceled = true
+ event.cancel()
ChatUtils.sendMessageToServer(replacedEvent.message)
}
}
@@ -150,7 +153,7 @@ object GetFromSackAPI {
CommandResult.WRONG_AMOUNT -> ChatUtils.userError("Invalid amount!")
CommandResult.INTERNAL_ERROR -> {}
}
- event.isCanceled = true
+ event.cancel()
}
private fun bazaarHandler(event: MessageSendToServerEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
index 842b9ec84d38..5c9c3017a7e3 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
@@ -19,6 +19,7 @@ import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.getLevel
import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.getLevelExact
import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.getSkillInfo
import at.hannibal2.skyhanni.features.skillprogress.SkillUtil.xpRequiredForLevel
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -39,6 +40,7 @@ import java.util.LinkedList
import java.util.regex.Matcher
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object SkillAPI {
private val patternGroup = RepoPattern.group("api.skilldisplay")
private val skillPercentPattern by patternGroup.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/CancellableSkyHanniEvent.kt b/src/main/java/at/hannibal2/skyhanni/api/event/CancellableSkyHanniEvent.kt
new file mode 100644
index 000000000000..048630b84942
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/CancellableSkyHanniEvent.kt
@@ -0,0 +1,3 @@
+package at.hannibal2.skyhanni.api.event
+
+abstract class CancellableSkyHanniEvent : SkyHanniEvent(), SkyHanniEvent.Cancellable
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt b/src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt
new file mode 100644
index 000000000000..cfc8e63b87a8
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/EventHandler.kt
@@ -0,0 +1,134 @@
+package at.hannibal2.skyhanni.api.event
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
+import at.hannibal2.skyhanni.test.command.ErrorManager
+import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
+import at.hannibal2.skyhanni.utils.chat.Text
+import java.lang.invoke.LambdaMetafactory
+import java.lang.invoke.MethodHandles
+import java.lang.invoke.MethodType
+import java.lang.reflect.Method
+import java.lang.reflect.ParameterizedType
+import java.util.function.Consumer
+
+class EventHandler private constructor(val name: String, private val isGeneric: Boolean) {
+
+ private val listeners: MutableList = mutableListOf()
+
+ private var isFrozen = false
+ private var canReceiveCancelled = false
+
+ var invokeCount: Long = 0L
+ private set
+
+ constructor(event: Class) : this(
+ (event.name.split(".").lastOrNull() ?: event.name).replace("$", "."),
+ GenericSkyHanniEvent::class.java.isAssignableFrom(event)
+ )
+
+ fun addListener(method: Method, instance: Any, options: HandleEvent) {
+ if (isFrozen) throw IllegalStateException("Cannot add listener to frozen event handler")
+ val generic: Class<*>? = if (isGeneric) {
+ method.genericParameterTypes
+ .firstNotNullOfOrNull { it as? ParameterizedType }
+ ?.let { it.actualTypeArguments.firstOrNull() as? Class<*> }
+ ?: throw IllegalArgumentException("Generic event handler must have a generic type")
+ } else {
+ null
+ }
+ val name = "${method.declaringClass.name}.${method.name}${
+ method.parameterTypes.joinTo(
+ StringBuilder(),
+ prefix = "(",
+ postfix = ")",
+ separator = ", ",
+ transform = Class<*>::getTypeName
+ )
+ }"
+ listeners.add(Listener(name, createEventConsumer(name, instance, method), options, generic))
+ }
+
+ @Suppress("UNCHECKED_CAST")
+ private fun createEventConsumer(name: String, instance: Any, method: Method): Consumer {
+ try {
+ val handle = MethodHandles.lookup().unreflect(method)
+ return LambdaMetafactory.metafactory(
+ MethodHandles.lookup(),
+ "accept",
+ MethodType.methodType(Consumer::class.java, instance::class.java),
+ MethodType.methodType(Nothing::class.javaPrimitiveType, Object::class.java),
+ handle,
+ MethodType.methodType(Nothing::class.javaPrimitiveType, method.parameterTypes[0])
+ ).target.bindTo(instance).invokeExact() as Consumer
+ } catch (e: Throwable) {
+ throw IllegalArgumentException("Method $name is not a valid consumer", e)
+ }
+ }
+
+ fun freeze() {
+ isFrozen = true
+ listeners.sortBy { it.options.priority }
+ canReceiveCancelled = listeners.any { it.options.receiveCancelled }
+ }
+
+ fun post(event: T, onError: ((Throwable) -> Unit)? = null): Boolean {
+ invokeCount++
+ if (this.listeners.isEmpty()) return false
+ if (!isFrozen) error("Cannot invoke event on unfrozen event handler")
+
+ if (SkyHanniEvents.isDisabledHandler(name)) return false
+
+ var errors = 0
+
+ for (listener in listeners) {
+ if (!shouldInvoke(event, listener)) continue
+ try {
+ listener.invoker.accept(event)
+ } catch (throwable: Throwable) {
+ errors++
+ if (errors <= 3) {
+ val errorName = throwable::class.simpleName ?: "error"
+ val message = "Caught an $errorName in ${listener.name} at $name: ${throwable.message}"
+ ErrorManager.logErrorWithData(throwable, message, ignoreErrorCache = onError != null)
+ }
+ onError?.invoke(throwable)
+ }
+ if (event.isCancelled && !canReceiveCancelled) break
+ }
+
+ if (errors > 3) {
+ val hiddenErrors = errors - 3
+ ChatUtils.chat(
+ Text.text(
+ "§c[SkyHanni/${SkyHanniMod.version}] $hiddenErrors more errors in $name are hidden!"
+ )
+ )
+ }
+ return event.isCancelled
+ }
+
+ private fun shouldInvoke(event: SkyHanniEvent, listener: Listener): Boolean {
+ if (SkyHanniEvents.isDisabledInvoker(listener.name)) return false
+ if (listener.options.onlyOnSkyblock && !LorenzUtils.inSkyBlock) return false
+ if (listener.options.onlyOnIsland != IslandType.ANY && !listener.options.onlyOnIsland.isInIsland()) return false
+ if (event.isCancelled && !listener.options.receiveCancelled) return false
+ if (
+ event is GenericSkyHanniEvent<*> &&
+ listener.generic != null &&
+ !listener.generic.isAssignableFrom(event.type)
+ ) {
+ return false
+ }
+ return true
+ }
+
+ private class Listener(
+ val name: String,
+ val invoker: Consumer,
+ val options: HandleEvent,
+ val generic: Class<*>?
+ )
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/GenericSkyHanniEvent.kt b/src/main/java/at/hannibal2/skyhanni/api/event/GenericSkyHanniEvent.kt
new file mode 100644
index 000000000000..1b761e1ae637
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/GenericSkyHanniEvent.kt
@@ -0,0 +1,3 @@
+package at.hannibal2.skyhanni.api.event
+
+abstract class GenericSkyHanniEvent(val type: Class) : SkyHanniEvent(), SkyHanniEvent.Cancellable
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/HandleEvent.kt b/src/main/java/at/hannibal2/skyhanni/api/event/HandleEvent.kt
new file mode 100644
index 000000000000..39b047a6e1de
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/HandleEvent.kt
@@ -0,0 +1,35 @@
+package at.hannibal2.skyhanni.api.event
+
+import at.hannibal2.skyhanni.data.IslandType
+
+@Retention(AnnotationRetention.RUNTIME)
+@Target(AnnotationTarget.FUNCTION)
+annotation class HandleEvent(
+ /**
+ * If the event should only be received while on SkyBlock.
+ */
+ val onlyOnSkyblock: Boolean = false,
+
+ /**
+ * If the event should only be received while on a specific skyblock island.
+ */
+ val onlyOnIsland: IslandType = IslandType.ANY,
+
+ /**
+ * The priority of when the event will be called, lower priority will be called first, see the companion object.
+ */
+ val priority: Int = 0,
+
+ /**
+ * If the event is cancelled & receiveCancelled is true, then the method will still invoke.
+ */
+ val receiveCancelled: Boolean = false,
+) {
+
+ companion object {
+ const val HIGHEST = -2
+ const val HIGH = -1
+ const val LOW = 1
+ const val LOWEST = 2
+ }
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvent.kt b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvent.kt
new file mode 100644
index 000000000000..4f3685c8bdff
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvent.kt
@@ -0,0 +1,19 @@
+package at.hannibal2.skyhanni.api.event
+
+abstract class SkyHanniEvent protected constructor() {
+
+ var isCancelled: Boolean = false
+ private set
+
+ fun post() = SkyHanniEvents.getEventHandler(javaClass).post(this)
+
+ fun post(onError: (Throwable) -> Unit = {}) = SkyHanniEvents.getEventHandler(javaClass).post(this, onError)
+
+ interface Cancellable {
+
+ fun cancel() {
+ val event = this as SkyHanniEvent
+ event.isCancelled = true
+ }
+ }
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt
new file mode 100644
index 000000000000..e3dff201485b
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt
@@ -0,0 +1,64 @@
+package at.hannibal2.skyhanni.api.event
+
+import at.hannibal2.skyhanni.data.MinecraftData
+import at.hannibal2.skyhanni.data.jsonobjects.repo.DisabledEventsJson
+import at.hannibal2.skyhanni.events.DebugDataCollectEvent
+import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.lang.reflect.Method
+
+@SkyHanniModule
+object SkyHanniEvents {
+
+ private val handlers: MutableMap, EventHandler<*>> = mutableMapOf()
+ private var disabledHandlers = emptySet()
+ private var disabledHandlerInvokers = emptySet()
+
+ fun init(instances: List) {
+ instances.forEach { instance ->
+ instance.javaClass.declaredMethods.forEach {
+ registerMethod(it, instance)
+ }
+ }
+ handlers.values.forEach { it.freeze() }
+ }
+
+ @Suppress("UNCHECKED_CAST")
+ fun getEventHandler(event: Class): EventHandler = handlers.getOrPut(event) {
+ EventHandler(event)
+ } as EventHandler
+
+ fun isDisabledHandler(handler: String): Boolean = handler in disabledHandlers
+ fun isDisabledInvoker(invoker: String): Boolean = invoker in disabledHandlerInvokers
+
+ @Suppress("UNCHECKED_CAST")
+ private fun registerMethod(method: Method, instance: Any) {
+ if (method.parameterCount != 1) return
+ val options = method.getAnnotation(HandleEvent::class.java) ?: return
+ val event = method.parameterTypes[0]
+ if (!SkyHanniEvent::class.java.isAssignableFrom(event)) return
+ val handler = getEventHandler(event as Class)
+ handler.addListener(method, instance, options)
+ }
+
+ @SubscribeEvent
+ fun onRepoLoad(event: RepositoryReloadEvent) {
+ val data = event.getConstant("DisabledEvents")
+ disabledHandlers = data.disabledHandlers
+ disabledHandlerInvokers = data.disabledInvokers
+ }
+
+ @SubscribeEvent
+ fun onDebug(event: DebugDataCollectEvent) {
+ event.title("Events")
+ event.addIrrelevant {
+ handlers.values.toMutableList()
+ .filter { it.invokeCount > 0 }
+ .sortedWith(compareBy({ -it.invokeCount }, { it.name }))
+ .forEach {
+ add("- ${it.name} (${it.invokeCount} ${it.invokeCount / (MinecraftData.totalTicks / 20)}/s)")
+ }
+ }
+ }
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
index 19ef97ec1a83..1e7684de8626 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
@@ -17,6 +17,7 @@ import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.json.BaseGsonBuilder
+import at.hannibal2.skyhanni.utils.system.PlatformUtils
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.JsonObject
@@ -128,7 +129,7 @@ class ConfigManager {
}
val configLink = field.getAnnotation(ConfigLink::class.java)
if (configLink == null) {
- if (LorenzUtils.isInDevEnvironment()) {
+ if (PlatformUtils.isDevEnvironment) {
var name = "${field.declaringClass.name}.${field.name}"
name = name.replace("at.hannibal2.skyhanni.config.", "")
if (name !in ignoredMissingConfigLinks) {
@@ -176,7 +177,7 @@ class ConfigManager {
val jsonObject = lenientGson.fromJson(bufferedReader.readText(), JsonObject::class.java)
val newJsonObject = ConfigUpdaterMigrator.fixConfig(jsonObject)
val run = { lenientGson.fromJson(newJsonObject, defaultValue.javaClass) }
- if (LorenzUtils.isInDevEnvironment()) {
+ if (PlatformUtils.isDevEnvironment) {
try {
run()
} catch (e: Throwable) {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
index b7fd4838b5b9..b674c382a16a 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
@@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {
val logger = LorenzLogger("ConfigMigration")
- const val CONFIG_VERSION = 47
+ const val CONFIG_VERSION = 49
fun JsonElement.at(chain: List, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
@@ -111,6 +111,7 @@ object ConfigUpdaterMigrator {
val lastVersion = (config["lastVersion"] as? JsonPrimitive)?.asIntOrNull ?: -1
if (lastVersion > CONFIG_VERSION) {
logger.log("Attempted to downgrade config version")
+ config.add("lastVersion", JsonPrimitive(CONFIG_VERSION))
return config
}
if (lastVersion == CONFIG_VERSION) return config
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 bd6cc8efea41..89980d349925 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -371,17 +371,11 @@ object Commands {
"Disables/enables the rendering of all skyhanni guis."
) { SkyHanniDebugsAndTests.toggleRender() }
registerCommand(
- "shcarrot",
- "Toggles receiving the 12 fortune from carrots"
- ) { CaptureFarmingGear.reverseCarrotFortune() }
- registerCommand(
- "shpumpkin",
- "Toggles receiving the 12 fortune from pumpkins"
- ) { CaptureFarmingGear.reversePumpkinFortune() }
- registerCommand(
- "shcocoabeans",
- "Toggles receiving the 12 fortune from cocoa beans"
- ) { CaptureFarmingGear.reverseCocoaBeansFortune() }
+ "shcarrolyn",
+ "Toggels if the specified crops effect is active from carrolyn"
+ ) {
+ CaptureFarmingGear.handelCarrolyn(it)
+ }
registerCommand(
"shrepostatus",
"Shows the status of all the mods constants"
diff --git a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
index 4378fe36e7b8..e0e8c28a5d60 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
@@ -20,9 +20,9 @@ package at.hannibal2.skyhanni.config.core.config.gui
import at.hannibal2.skyhanni.config.core.config.Position
import at.hannibal2.skyhanni.data.GuiEditManager
-import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsX
-import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsY
-import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getDummySize
+import at.hannibal2.skyhanni.data.GuiEditManager.getAbsX
+import at.hannibal2.skyhanni.data.GuiEditManager.getAbsY
+import at.hannibal2.skyhanni.data.GuiEditManager.getDummySize
import at.hannibal2.skyhanni.data.OtherInventoryData
import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer
import at.hannibal2.skyhanni.utils.GuiRenderUtils
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java
index 095c3733ca6b..b477d23297a6 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/SkyMartConfig.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.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
@@ -23,4 +24,26 @@ public class SkyMartConfig {
@Expose
@ConfigLink(owner = SkyMartConfig.class, field = "copperPrice")
public Position copperPricePos = new Position(211, 132, false, true);
+
+ @Expose
+ @ConfigOption(name = "Overlay Price", desc = "Toggle for Bazaar 'sell order' vs 'instant sell' price in copper price overlay.")
+ @ConfigEditorDropdown
+ public OverlayPriceTypeEntry overlayPriceType = OverlayPriceTypeEntry.INSTANT_SELL;
+
+ public enum OverlayPriceTypeEntry {
+ INSTANT_SELL("Instant Sell"),
+ SELL_ORDER("Sell Order"),
+ ;
+ private final String str;
+
+
+ OverlayPriceTypeEntry(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
index 3d714199bad3..02cdae33a033 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/VisitorConfig.java
@@ -37,6 +37,12 @@ public class VisitorConfig {
@FeatureToggle
public boolean notificationChat = true;
+ @Expose
+ @ConfigOption(name = "Compact Chat", desc = "Compact reward summary messages when you accept an offer.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean compactRewardChat = false;
+
@Expose
@ConfigOption(name = "Notification Title", desc = "Show a title when a new visitor is visiting your island.")
@ConfigEditorBoolean
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MayorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MayorConfig.java
index 0dbc4da0f382..ed6abdc7cf2b 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MayorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/customscoreboard/MayorConfig.java
@@ -14,4 +14,10 @@ public class MayorConfig {
@ConfigOption(name = "Show Time till next mayor", desc = "Show the time till the next mayor is elected.")
@ConfigEditorBoolean
public boolean showTimeTillNextMayor = true;
+
+ @Expose
+ // TODO: Same Toggle toggles ministers
+ @ConfigOption(name = "Show Extra Mayor", desc = "Show the Perkacolypse Mayor without their perks.")
+ @ConfigEditorBoolean
+ public boolean showExtraMayor = true;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
index 872fb8ad6ba1..f20643cc323b 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
@@ -3,6 +3,7 @@
import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.HasLegacyId;
import at.hannibal2.skyhanni.config.features.inventory.chocolatefactory.ChocolateFactoryConfig;
+import at.hannibal2.skyhanni.config.features.inventory.customwardrobe.CustomWardrobeConfig;
import at.hannibal2.skyhanni.config.features.inventory.helper.HelperConfig;
import at.hannibal2.skyhanni.config.features.itemability.ItemAbilityConfig;
import at.hannibal2.skyhanni.config.features.misc.EstimatedItemValueConfig;
@@ -49,6 +50,10 @@ public class InventoryConfig {
@Category(name = "Item Abilities", desc = "Stuff about item abilities.")
public ItemAbilityConfig itemAbilities = new ItemAbilityConfig();
+ @Expose
+ @Category(name = "Custom Wardrobe", desc = "New Wardrobe Look.")
+ public CustomWardrobeConfig customWardrobe = new CustomWardrobeConfig();
+
@Expose
@Category(name = "Chocolate Factory", desc = "Features to help you master the Chocolate Factory idle game.")
public ChocolateFactoryConfig chocolateFactory = new ChocolateFactoryConfig();
@@ -93,16 +98,13 @@ public class InventoryConfig {
@Accordion
public GetFromSackConfig gfs = new GetFromSackConfig();
+ @Expose
@ConfigOption(name = "Pocket Sack-In-A-Sack", desc = "")
@Accordion
- @Expose
public PocketSackInASackConfig pocketSackInASack = new PocketSackInASackConfig();
@Expose
- @ConfigOption(
- name = "Item Number",
- desc = "Showing the item number as a stack size for these items."
- )
+ @ConfigOption(name = "Item Number", desc = "Showing the item number as a stack size for these items.")
@ConfigEditorDraggableList
public List itemNumberAsStackSize = new ArrayList<>(Arrays.asList(
NEW_YEAR_CAKE,
@@ -168,10 +170,10 @@ public String toString() {
public boolean vacuumBagCap = true;
@Expose
- @ConfigOption(
- name = "Quick Craft Confirmation",
+ @ConfigOption(name = "Quick Craft Confirmation",
desc = "Require Ctrl+Click to craft items that aren't often quick crafted " +
- "(e.g. armor, weapons, accessories). Sack items can be crafted normally."
+ "(e.g. armor, weapons, accessories). " +
+ "Sack items can be crafted normally."
)
@ConfigEditorBoolean
@FeatureToggle
@@ -190,28 +192,31 @@ public String toString() {
public boolean anvilCombineHelper = false;
@Expose
- @ConfigOption(name = "Item Stars",
- desc = "Show a compact star count in the item name for all items.")
+ @ConfigOption(name = "Item Stars", desc = "Show a compact star count in the item name for all items.")
@ConfigEditorBoolean
@FeatureToggle
public boolean itemStars = false;
@Expose
- @ConfigOption(name = "Missing Tasks",
- desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.")
+ @ConfigOption(name = "Missing Tasks", desc = "Highlight missing tasks in the SkyBlock Level Guide inventory.")
// TODO move( , "inventory.highlightMissingSkyBlockLevelGuide", "inventory.skyblockGuideConfig.highlightMissingSkyBlockLevelGuide")
@ConfigEditorBoolean
@FeatureToggle
public boolean highlightMissingSkyBlockLevelGuide = true;
@Expose
- @ConfigOption(name = "Power Stone Guide",
- desc = "Highlight missing power stones, show their total bazaar price, and allows to open the bazaar when clicking on the items in the Power Stone Guide.")
+ @ConfigOption(name = "Power Stone Guide", desc = "Highlight missing power stones, show their total bazaar price, and allows to open the bazaar when clicking on the items in the Power Stone Guide.")
// TODO move( , "inventory.powerStoneGuide", "inventory.skyblockGuideConfig.powerStoneGuide")
@ConfigEditorBoolean
@FeatureToggle
public boolean powerStoneGuide = true;
+ @Expose
+ @ConfigOption(name = "Favorite Power Stone", desc = "Shows your favorite power stones. You can add/remove them by shift clicking a Power Stone.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean favoritePowerStone = false;
+
@Expose
@ConfigOption(name = "Shift Click Equipment", desc = "Makes normal clicks to shift clicks in equipment inventory.")
@ConfigEditorBoolean
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java
index 50230a6ae960..ae36b2a5128e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java
@@ -98,6 +98,12 @@ public class ChocolateFactoryConfig {
@FeatureToggle
public boolean showDuplicateTime = false;
+ @Expose
+ @ConfigOption(name = "Stray Rabbit Time", desc = "Show the production time of chocolate gained from stray rabbits.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean showStrayTime = false;
+
@Expose
@ConfigOption(name = "Time Tower Usage Warning", desc = "Notification when you have a new time tower usage available and " +
"continuously warn when your time tower is full.")
@@ -174,6 +180,15 @@ public class ChocolateFactoryConfig {
@FeatureToggle
public boolean highlightRabbitsWithRequirement = false;
+ @Expose
+ @ConfigOption(
+ name = "Show Missing Location Rabbits",
+ desc = "Shows which in which locations you have not yet found enough egg locations to unlock the rabbit for that location."
+ )
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean showLocationRequirementsRabbitsInHoppityStats = false;
+
@Expose
@ConfigOption(name = "Only Requirement Not Met", desc = "Only highlight the rabbits you don't have the requirement for.")
@ConfigEditorBoolean
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java
new file mode 100644
index 000000000000..20f9282542b3
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/ColorConfig.java
@@ -0,0 +1,44 @@
+package at.hannibal2.skyhanni.config.features.inventory.customwardrobe;
+
+import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+
+public class ColorConfig {
+
+ @Expose
+ @ConfigOption(name = "Background", desc = "Color of the GUI background.")
+ @ConfigEditorColour
+ public String backgroundColor = "0:127:0:0:0";
+
+ @Expose
+ @ConfigOption(name = "Equipped", desc = "Color of the currently equipped wardrobe slot.")
+ @ConfigEditorColour
+ public String equippedColor = "0:127:85:255:85";
+
+ @Expose
+ @ConfigOption(name = "Favorite", desc = "Color of the wardrobe slots that have been added as favorites.")
+ @ConfigEditorColour
+ public String favoriteColor = "0:127:255:85:85";
+
+ @Expose
+ @ConfigOption(name = "Same Page", desc = "Color of wardrobe slots in the same page.")
+ @ConfigEditorColour
+ public String samePageColor = "0:127:94:108:255";
+
+ @Expose
+ @ConfigOption(name = "Other Page", desc = "Color of wardrobe slots in another page.")
+ @ConfigEditorColour
+ public String otherPageColor = "0:127:0:0:0";
+
+ @Expose
+ @ConfigOption(name = "Top Outline", desc = "Color of the top of the outline when hovered.")
+ @ConfigEditorColour
+ public String topBorderColor = "0:255:255:200:0";
+
+ @Expose
+ @ConfigOption(name = "Bottom Outline", desc = "Color of the bottom of the outline when hovered.")
+ @ConfigEditorColour
+ public String bottomBorderColor = "0:255:255:0:0";
+
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java
new file mode 100644
index 000000000000..a4ea69badb20
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/CustomWardrobeConfig.java
@@ -0,0 +1,54 @@
+package at.hannibal2.skyhanni.config.features.inventory.customwardrobe;
+
+import at.hannibal2.skyhanni.config.FeatureToggle;
+import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.Accordion;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+
+public class CustomWardrobeConfig {
+
+ @Expose
+ @ConfigOption(name = "Enable", desc = "Enables the Custom Wardrobe GUI.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean enabled = true;
+
+ @Expose
+ @ConfigOption(name = "Follow mouse", desc = "Players follow the movement of the mouse.")
+ @ConfigEditorBoolean
+ public boolean eyesFollowMouse = true;
+
+ @Expose
+ @ConfigOption(name = "Hide Empty Slots", desc = "Hides wardrobe slots with no armor.")
+ @ConfigEditorBoolean
+ public boolean hideEmptySlots = false;
+
+ @Expose
+ @ConfigOption(name = "Hide Locked Slots", desc = "Hides locked wardrobe slots.")
+ @ConfigEditorBoolean
+ public boolean hideLockedSlots = false;
+
+ @Expose
+ public boolean onlyFavorites = false;
+
+ @Expose
+ @ConfigOption(name = "Estimated Value", desc = "Show a §2$ §7sign you can hover to see the wardrobe slot value.")
+ @ConfigEditorBoolean
+ public boolean estimatedValue = true;
+
+ @Expose
+ @ConfigOption(name = "Loading text", desc = "Shows a \"§cLoading...\" §7text when the wardrobe page hasn't fully loaded in yet.")
+ @ConfigEditorBoolean
+ public boolean loadingText = true;
+
+ @Expose
+ @ConfigOption(name = "Colors", desc = "Change the color settings.")
+ @Accordion
+ public ColorConfig color = new ColorConfig();
+
+ @Expose
+ @ConfigOption(name = "Spacing", desc = "")
+ @Accordion
+ public SpacingConfig spacing = new SpacingConfig();
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java
new file mode 100644
index 000000000000..363a9a6a70bf
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/customwardrobe/SpacingConfig.java
@@ -0,0 +1,145 @@
+package at.hannibal2.skyhanni.config.features.inventory.customwardrobe;
+
+import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+import io.github.notenoughupdates.moulconfig.observer.Property;
+
+public class SpacingConfig {
+
+ @Expose
+ @ConfigOption(name = "Global Scale", desc = "Controls the scale of the entirety of the wardrobe.")
+ @ConfigEditorSlider(
+ minValue = 30,
+ maxValue = 200,
+ minStep = 1
+ )
+ public Property globalScale = Property.of(100);
+
+ @Expose
+ @ConfigOption(name = "Outline Thickness", desc = "How thick the outline of the hovered slot is.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 15,
+ minStep = 1
+ )
+ public Property outlineThickness = Property.of(5);
+
+ @Expose
+ @ConfigOption(name = "Outline Blur", desc = "Amount of blur of the outline.")
+ @ConfigEditorSlider(
+ minValue = 0f,
+ maxValue = 1f,
+ minStep = 0.1f
+ )
+ public Property outlineBlur = Property.of(0.5f);
+
+ @Expose
+ @ConfigOption(name = "Slot Width", desc = "Width of the wardrobe slots.")
+ @ConfigEditorSlider(
+ minValue = 30,
+ maxValue = 100,
+ minStep = 1
+ )
+ public Property slotWidth = Property.of(75);
+
+ @Expose
+ @ConfigOption(name = "Slot Height", desc = "Height of the wardrobe slots.")
+ @ConfigEditorSlider(
+ minValue = 60,
+ maxValue = 200,
+ minStep = 1
+ )
+ public Property slotHeight = Property.of(140);
+
+ @Expose
+ @ConfigOption(name = "Player Scale", desc = "Scale of the players.")
+ @ConfigEditorSlider(
+ minValue = 0,
+ maxValue = 100,
+ minStep = 1
+ )
+ public Property playerScale = Property.of(75);
+
+ @Expose
+ @ConfigOption(name = "Slots per Row", desc = "Max amount of wardrobe slots per row.")
+ @ConfigEditorSlider(
+ minValue = 5,
+ maxValue = 18,
+ minStep = 1
+ )
+ public Property maxPlayersPerRow = Property.of(9);
+
+ @Expose
+ @ConfigOption(name = "Slots Horizontal Spacing", desc = "How much space horizontally between wardrobe slots.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 20,
+ minStep = 1
+ )
+ public Property horizontalSpacing = Property.of(3);
+
+ @Expose
+ @ConfigOption(name = "Slots Vertical Spacing", desc = "How much space vertically between wardrobe slots.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 20,
+ minStep = 1
+ )
+ public Property verticalSpacing = Property.of(3);
+
+ @Expose
+ @ConfigOption(name = "Slots & Buttons Spacing", desc = "How much vertical space there is between wardrobe slots and the buttons.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 40,
+ minStep = 1
+ )
+ public Property buttonSlotsVerticalSpacing = Property.of(10);
+
+ @Expose
+ @ConfigOption(name = "Button Horizontal Spacing", desc = "How much space horizontally between buttons.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 40,
+ minStep = 1
+ )
+ public Property buttonHorizontalSpacing = Property.of(10);
+
+ @Expose
+ @ConfigOption(name = "Button Vertical Spacing", desc = "How much space vertically between buttons.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 40,
+ minStep = 1
+ )
+ public Property buttonVerticalSpacing = Property.of(10);
+
+ @Expose
+ @ConfigOption(name = "Button Width", desc = "Width of the buttons.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 60,
+ minStep = 1
+ )
+ public Property buttonWidth = Property.of(50);
+
+ @Expose
+ @ConfigOption(name = "Button Height", desc = "Height of the buttons.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 60,
+ minStep = 1
+ )
+ public Property buttonHeight = Property.of(20);
+
+ @Expose
+ @ConfigOption(name = "Background Padding", desc = "Space between the edges of the background and the slots.")
+ @ConfigEditorSlider(
+ minValue = 1,
+ maxValue = 20,
+ minStep = 1
+ )
+ public Property backgroundPadding = Property.of(10);
+
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java
index 79238b29f1c3..2f277d92500b 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java
@@ -45,11 +45,6 @@ public class PowderTrackerConfig {
@ConfigEditorBoolean
public boolean onlyWhenPowderGrinding = false;
- @Expose
- @ConfigOption(name = "Great Explorer", desc = "Enable this if your Great Explorer perk is maxed.")
- @ConfigEditorBoolean
- public boolean greatExplorerMaxed = false;
-
@Expose
@ConfigOption(
name = "Text Format",
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 c390e7feb247..536ac1e5269c 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
@@ -199,7 +199,7 @@ public class MiscConfig {
public boolean restorePieceOfWizardPortalLore = true;
@Expose
- @ConfigOption(name = "Account Upgrade Reminder", desc = "Remind you to claim account upgrades when complete.")
+ @ConfigOption(name = "Account Upgrade Reminder", desc = "Remind you to claim community shop account and profile upgrades when complete.")
@ConfigEditorBoolean
@FeatureToggle
public boolean accountUpgradeReminder = true;
@@ -266,6 +266,12 @@ public class MiscConfig {
@FeatureToggle
public boolean replaceRomanNumerals = false;
+ @Expose
+ @ConfigOption(name = "Unknown Perkpocalypse Mayor Warning", desc = "Show a warning when the Unknown Perkpocalypse Mayor is unknown.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean unknownPerkpocalypseMayorWarning = true;
+
@ConfigOption(name = "Hide Far Entities", desc = "")
@Accordion
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java
index e30f62946263..171cb82b1b38 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java
@@ -1,7 +1,10 @@
package at.hannibal2.skyhanni.config.storage;
import at.hannibal2.skyhanni.features.bingo.card.goals.BingoGoal;
+import at.hannibal2.skyhanni.features.fame.UpgradeReminder;
+import at.hannibal2.skyhanni.utils.GenericWrapper;
import at.hannibal2.skyhanni.utils.NEUInternalName;
+import at.hannibal2.skyhanni.utils.SimpleTimeMark;
import com.google.gson.annotations.Expose;
import java.util.ArrayList;
@@ -23,13 +26,10 @@ public class PlayerSpecificStorage {
public Integer gardenCommunityUpgrade = -1;
@Expose
- public long nextCityProjectParticipationTime = 0L;
+ public SimpleTimeMark nextCityProjectParticipationTime = GenericWrapper.getSimpleTimeMark(SimpleTimeMark.farPast()).getIt();
@Expose
- public String currentAccountUpgrade = null;
-
- @Expose
- public long nextAccountUpgradeCompletionTime = -1L;
+ public UpgradeReminder.CommunityShopUpgrade communityShopAccountUpgrade = null;
@Expose
public List guildMembers = new ArrayList<>();
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 d88ccb315313..e037b80a63f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
@@ -14,6 +14,7 @@
import at.hannibal2.skyhanni.features.event.diana.MythologicalCreatureTracker;
import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats;
import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker;
+import at.hannibal2.skyhanni.features.fame.UpgradeReminder;
import at.hannibal2.skyhanni.features.fishing.tracker.FishingProfitTracker;
import at.hannibal2.skyhanni.features.fishing.tracker.SeaCreatureTracker;
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity;
@@ -27,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.wardrobe.WardrobeAPI;
import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTracker;
import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker;
import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker;
@@ -34,8 +36,10 @@
import at.hannibal2.skyhanni.features.rift.area.westvillage.kloon.KloonTerminal;
import at.hannibal2.skyhanni.features.skillprogress.SkillType;
import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker;
+import at.hannibal2.skyhanni.utils.GenericWrapper;
import at.hannibal2.skyhanni.utils.LorenzVec;
import at.hannibal2.skyhanni.utils.NEUInternalName;
+import at.hannibal2.skyhanni.utils.SimpleTimeMark;
import com.google.gson.annotations.Expose;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.Nullable;
@@ -48,6 +52,10 @@
public class ProfileSpecificStorage {
+ private static SimpleTimeMark SimpleTimeMarkFarPast() {
+ return GenericWrapper.getSimpleTimeMark(SimpleTimeMark.farPast()).getIt();
+ }
+
@Expose
public String currentPet = "";
@@ -83,10 +91,10 @@ public static class ChocolateFactoryStorage {
public int timeTowerLevel = 0;
@Expose
- public long currentTimeTowerEnds = 0;
+ public SimpleTimeMark currentTimeTowerEnds = SimpleTimeMarkFarPast();
@Expose
- public long nextTimeTower = 0;
+ public SimpleTimeMark nextTimeTower = SimpleTimeMarkFarPast();
@Expose
public int currentTimeTowerUses = -1;
@@ -101,20 +109,21 @@ public static class ChocolateFactoryStorage {
public boolean hasMuRabbit = false;
@Expose
- public long bestUpgradeAvailableAt = 0;
+ public SimpleTimeMark bestUpgradeAvailableAt = SimpleTimeMarkFarPast();
@Expose
public long bestUpgradeCost = 0;
@Expose
- public long lastDataSave = 0;
+ public SimpleTimeMark lastDataSave = SimpleTimeMarkFarPast();
@Expose
public PositionChange positionChange = new PositionChange();
public static class PositionChange {
@Expose
- public Long lastTime = null;
+ @Nullable
+ public SimpleTimeMark lastTime = null;
@Expose
public int lastPosition = -1;
@@ -130,10 +139,13 @@ public static class PositionChange {
public String targetName = null;
@Expose
- public Map rabbitCounts = new HashMap();
+ public Map rabbitCounts = new HashMap<>();
@Expose
- public Map> collectedEggLocations = new HashMap();
+ public Map locationRabbitRequirements = new HashMap<>();
+
+ @Expose
+ public Map> collectedEggLocations = new HashMap<>();
@Expose
public Integer hoppityShopYearOpened = null;
@@ -151,6 +163,9 @@ public static class MaxwellPowerStorage {
@Expose
public List tunings = new ArrayList<>();
+
+ @Expose
+ public List favoritePowers = new ArrayList<>();
}
@Expose
@@ -175,7 +190,8 @@ public static class BitsStorage {
public int bitsAvailable = -1;
@Expose
- public Long boosterCookieExpiryTime = null;
+ @Nullable
+ public SimpleTimeMark boosterCookieExpiryTime = null;
}
@Expose
@@ -186,6 +202,7 @@ public static class MinionConfig {
@Expose
public String displayName = "";
+ // TODO use SimpleTimeMark
@Expose
public long lastClicked = -1;
@@ -204,7 +221,8 @@ public String toString() {
public static class BeaconPowerStorage {
@Expose
- public Long beaconPowerExpiryTime = null;
+ @Nullable
+ public SimpleTimeMark beaconPowerExpiryTime = null;
@Expose
public String boostedStat = null;
@@ -259,16 +277,16 @@ public static class GardenStorage {
public DicerRngDropTracker.Data dicerDropTracker = new DicerRngDropTracker.Data();
@Expose
- public long informedAboutLowMatter = 0;
+ public SimpleTimeMark informedAboutLowMatter = SimpleTimeMarkFarPast();
@Expose
- public long informedAboutLowFuel = 0;
+ public SimpleTimeMark informedAboutLowFuel = SimpleTimeMarkFarPast();
@Expose
public long visitorInterval = 15 * 60_000L;
@Expose
- public long nextSixthVisitorArrival = 0;
+ public SimpleTimeMark nextSixthVisitorArrival = SimpleTimeMarkFarPast();
@Expose
public ArmorDropTracker.Data armorDropTracker = new ArmorDropTracker.Data();
@@ -370,26 +388,20 @@ public static class Fortune {
public int plotsUnlocked = -1;
@Expose
- public long cakeExpiring = -1L;
+ public SimpleTimeMark cakeExpiring = null;
@Expose
- public boolean carrotFortune = false;
-
- @Expose
- public boolean pumpkinFortune = false;
-
- @Expose
- public boolean cocoaBeansFortune = false;
+ public Map carrolyn = new HashMap<>();
@Expose
public Map farmingItems = new HashMap<>();
}
@Expose
- public long composterEmptyTime = 0;
+ public SimpleTimeMark composterEmptyTime = SimpleTimeMarkFarPast();
@Expose
- public long lastComposterEmptyWarningTime = 0;
+ public SimpleTimeMark lastComposterEmptyWarningTime = SimpleTimeMarkFarPast();
@Expose
public GardenStorage.FarmingWeightConfig farmingWeight = new GardenStorage.FarmingWeightConfig();
@@ -557,7 +569,7 @@ public static class DungeonStorage {
public Map bosses = new HashMap<>();
@Expose
- public List runs = CroesusChestTracker.Companion.generateMaxChestAsList();
+ public List runs = CroesusChestTracker.generateMaxChestAsList();
public static class DungeonRunInfo {
@@ -607,10 +619,25 @@ public static class DianaStorage {
public DianaProfitTracker.Data dianaProfitTracker = new DianaProfitTracker.Data();
@Expose
- // TODO renmae
+ // TODO rename
public MythologicalCreatureTracker.Data mythologicalMobTracker = new MythologicalCreatureTracker.Data();
}
@Expose
public Map skillData = new HashMap<>();
+
+ @Expose
+ public WardrobeStorage wardrobe = new WardrobeStorage();
+
+ public static class WardrobeStorage {
+ @Expose
+ public Map data = new HashMap<>();
+
+ @Expose
+ @Nullable
+ public Integer currentSlot = null;
+ }
+
+ @Expose
+ public UpgradeReminder.CommunityShopUpgrade communityShopProfileUpgrade = null;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt
index 74617e9b3c38..1cef0be01b3f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt
@@ -2,10 +2,12 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.ActionBarUpdateEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object ActionBarData {
private var actionBar = ""
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt b/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt
index fc7480729823..b2145db767c5 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.ActionBarUpdateEvent
import at.hannibal2.skyhanni.events.ActionBarValueUpdateEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
@@ -37,6 +38,7 @@ enum class ActionBarStatsData(@Language("RegExp") rawPattern: String) {
var value: String = ""
private set
+ @SkyHanniModule
companion object {
init {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
index 18d3ee1f9098..c7c8925c7b00 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.BitsUpdateEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -16,7 +17,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.SimpleTimeMark
-import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark
import at.hannibal2.skyhanni.utils.StringUtils.removeResets
import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace
import at.hannibal2.skyhanni.utils.TimeUtils
@@ -24,6 +24,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.days
+@SkyHanniModule
object BitsAPI {
private val profileStorage get() = ProfileStorageData.profileSpecific?.bits
private val playerStorage get() = SkyHanniMod.feature.storage
@@ -47,12 +48,12 @@ object BitsAPI {
}
var cookieBuffTime: SimpleTimeMark?
- get() = profileStorage?.boosterCookieExpiryTime?.asTimeMark()
+ get() = profileStorage?.boosterCookieExpiryTime
private set(value) {
- profileStorage?.boosterCookieExpiryTime = value?.toMillis()
+ profileStorage?.boosterCookieExpiryTime = value
}
- private const val defaultcookiebits = 4800
+ private const val defaultCookieBits = 4800
private val bitsDataGroup = RepoPattern.group("data.bits")
@@ -193,7 +194,7 @@ object BitsAPI {
}
boosterCookieAte.matchMatcher(message) {
- bitsAvailable += (defaultcookiebits * (currentFameRank?.bitsMultiplier ?: return)).toInt()
+ bitsAvailable += (defaultCookieBits * (currentFameRank?.bitsMultiplier ?: return)).toInt()
val cookieTime = cookieBuffTime
cookieBuffTime = if (cookieTime == null) SimpleTimeMark.now() + 4.days else cookieTime + 4.days
sendBitsAvailableGainedEvent()
@@ -306,7 +307,9 @@ object BitsAPI {
fun hasCookieBuff() = cookieBuffTime?.isInFuture() ?: false
- private fun sendBitsGainEvent(difference: Int) = BitsUpdateEvent.BitsGain(bits, bitsAvailable, difference).postAndCatch()
+ private fun sendBitsGainEvent(difference: Int) =
+ BitsUpdateEvent.BitsGain(bits, bitsAvailable, difference).postAndCatch()
+
private fun sendBitsSpentEvent() = BitsUpdateEvent.BitsSpent(bits, bitsAvailable).postAndCatch()
private fun sendBitsAvailableGainedEvent() = BitsUpdateEvent.BitsAvailableGained(bits, bitsAvailable).postAndCatch()
diff --git a/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt b/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt
index 32a2ee17d032..0dcc1714e1a1 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt
@@ -1,28 +1,25 @@
package at.hannibal2.skyhanni.data
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.ServerBlockChangeEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraft.network.play.server.S22PacketMultiBlockChange
import net.minecraft.network.play.server.S23PacketBlockChange
-import net.minecraftforge.fml.common.eventhandler.EventPriority
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class BlockData {
+@SkyHanniModule
+object BlockData {
- @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
- fun onBlockReceivePacket(event: PacketEvent.ReceiveEvent) {
-
- @Suppress("USELESS_ELVIS")
- val packet = event.packet ?: return
-
- if (packet is S23PacketBlockChange) {
- val blockPos = packet.blockPosition ?: return
- val blockState = packet.blockState ?: return
+ @HandleEvent(priority = HandleEvent.LOW, receiveCancelled = true)
+ fun onBlockReceivePacket(event: PacketReceivedEvent) {
+ if (event.packet is S23PacketBlockChange) {
+ val blockPos = event.packet.blockPosition ?: return
+ val blockState = event.packet.blockState ?: return
ServerBlockChangeEvent(blockPos, blockState).postAndCatch()
- } else if (packet is S22PacketMultiBlockChange) {
- for (block in packet.changedBlocks) {
+ } else if (event.packet is S22PacketMultiBlockChange) {
+ for (block in event.packet.changedBlocks) {
ServerBlockChangeEvent(block.pos, block.blockState).postAndCatch()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt
index 75ad8df9bc51..77daa26011a2 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt
@@ -3,9 +3,11 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.BossbarUpdateEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraft.entity.boss.BossStatus
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object BossbarData {
private var bossbar: String? = null
private var previousServerBossbar = ""
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
index ef032f6fc360..965b4af578b8 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
@@ -1,9 +1,10 @@
package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.MessageSendToServerEvent
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent
import at.hannibal2.skyhanni.features.chat.ChatFilterGui
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
@@ -11,10 +12,10 @@ import at.hannibal2.skyhanni.utils.IdentityCharacteristics
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.ReflectionUtils.getClassInstance
-import at.hannibal2.skyhanni.utils.ReflectionUtils.getModContainer
import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.chat.Text.send
+import at.hannibal2.skyhanni.utils.system.PlatformUtils.getModInstance
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.ChatLine
import net.minecraft.client.gui.GuiNewChat
@@ -76,17 +77,17 @@ object ChatManager {
val hoverExtraInfo: List = listOf(),
)
- @SubscribeEvent
- fun onSendMessageToServerPacket(event: PacketEvent.SendEvent) {
+ @HandleEvent
+ fun onSendMessageToServerPacket(event: PacketSentEvent) {
val packet = event.packet as? C01PacketChatMessage ?: return
val message = packet.message
val component = ChatComponentText(message)
val originatingModCall = event.findOriginatingModCall()
- val originatingModContainer = originatingModCall?.getClassInstance()?.getModContainer()
+ val originatingModContainer = originatingModCall?.getClassInstance()?.getModInstance()
val hoverInfo = listOf(
"§7Message created by §a${originatingModCall?.toString() ?: "§cprobably minecraft"}",
- "§7Mod id: §a${originatingModContainer?.modId}",
+ "§7Mod id: §a${originatingModContainer?.id}",
"§7Mod name: §a${originatingModContainer?.name}"
)
val stackTrace =
@@ -108,7 +109,7 @@ object ChatManager {
originatingModContainer
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
messageHistory[IdentityCharacteristics(component)] = result.copy(actionKind = ActionKind.OUTGOING_BLOCKED)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
index f9a9107a6ce7..d1923a938dfb 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.features.garden.CropAccessory
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -13,6 +14,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object CropAccessoryData {
private val accessoryBagNamePattern by RepoPattern.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
index 318ac465a3f5..c8e90fd279f7 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
@@ -1,12 +1,13 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.events.entity.EntityDisplayNameEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
@@ -57,8 +58,8 @@ object EntityData {
maxHealthMap.clear()
}
- @SubscribeEvent
- fun onHealthUpdatePacket(event: PacketEvent.ReceiveEvent) {
+ @HandleEvent
+ fun onHealthUpdatePacket(event: PacketReceivedEvent) {
val packet = event.packet
if (packet !is S1CPacketEntityMetadata) return
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
index 277ffb5deaa0..92a36b62363d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWarpEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
@@ -15,6 +16,7 @@ import net.minecraft.client.Minecraft
import net.minecraft.entity.Entity
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object EntityMovementData {
private val warpingPattern by RepoPattern.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt b/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt
index 28f1e254b3b7..6e308c18965f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.SecondPassedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
@@ -9,6 +10,7 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object EventCounter {
private val config get() = SkyHanniMod.feature.dev.debug
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt b/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt
index 663e2b9703e6..750f1294390e 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt
@@ -2,8 +2,10 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.data.jsonobjects.repo.FameRankJson
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object FameRanks {
var fameRanks = emptyMap()
private set
@@ -13,7 +15,7 @@ object FameRanks {
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
val ranks = event.getConstant("FameRank")
- fameRanks = ranks.fame_rank.values.map { FameRank(it.name, it.fame_required, it.bits_multiplier, it.votes) }
+ fameRanks = ranks.fameRank.values.map { FameRank(it.name, it.fameRequired, it.bitsMultiplier, it.votes) }
.associateBy { it.name }
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt
index a0125d35ee1a..4d825b2e9b9d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt
@@ -1,11 +1,13 @@
package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.SecondPassedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.client.Minecraft
import kotlin.concurrent.fixedRateTimer
-class FixedRateTimerManager {
+@SkyHanniModule
+object FixedRateTimerManager {
private var totalSeconds = 0
init {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
index 875229d1cadc..1abe31736214 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson
import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson.PlayerFriends.Friend
import at.hannibal2.skyhanni.events.HypixelJoinEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
@@ -15,6 +16,7 @@ import net.minecraft.util.ChatStyle
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.UUID
+@SkyHanniModule
object FriendAPI {
private val patternGroup = RepoPattern.group("data.friends")
private val removedFriendPattern by patternGroup.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt
index 19943ad05f9c..18093b880b86 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt
@@ -4,12 +4,14 @@ import at.hannibal2.skyhanni.data.model.ComposterUpgrade
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.composter.ComposterAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class GardenComposterUpgradesData {
+@SkyHanniModule
+object GardenComposterUpgradesData {
@SubscribeEvent
fun onInventoryOpen(event: InventoryFullyOpenedEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
index 5100a042d13a..5e236c4c5f64 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils.chat
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.NumberUtil.formatLong
@@ -16,16 +17,17 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object GardenCropMilestones {
private val patternGroup = RepoPattern.group("data.garden.milestone")
private val cropPattern by patternGroup.pattern(
"crop",
- "§7Harvest §f(?.*) §7on .*"
+ "§7Harvest §f(?.*) §7on .*",
)
val totalPattern by patternGroup.pattern(
"total",
- "§7Total: §a(?.*)"
+ "§7Total: §a(?.*)",
)
private val config get() = GardenAPI.config.cropMilestones
@@ -65,9 +67,10 @@ object GardenCropMilestones {
add(" §r§7§8+§d2 SkyHanni User Luck")
}
+ val cropName = crop.cropName
val messages = listOf(
"§r§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬§r",
- " §r§b§lGARDEN MILESTONE §3${crop.cropName} §8$oldLevel➜§3$newLevel§r",
+ " §r§b§lGARDEN MILESTONE §3$cropName §8$oldLevel➜§3$newLevel§r",
if (goalReached)
listOf(
"",
@@ -78,13 +81,16 @@ object GardenCropMilestones {
"",
" §r§a§lREWARDS§r",
rewards.joinToString("\n"),
- "§r§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬§r"
+ "§r§3§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬§r",
)
chat(messages.joinToString("\n"), false)
- if (goalReached)
- chat("§e§lYou have reached your milestone goal of §b§l${customGoalLevel} §e§lin the §b§l${crop.cropName} §e§lcrop!", false)
+ val message = "§e§lYou have reached your milestone goal of §b§l$customGoalLevel " +
+ "§e§lin the §b§l$cropName §e§lcrop!"
+ if (goalReached) {
+ chat(message, false)
+ }
SoundUtils.createSound("random.levelup", 1f, 1f).playSound()
}
@@ -179,6 +185,6 @@ object GardenCropMilestones {
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
- cropMilestoneData = event.getConstant("Garden").crop_milestones
+ cropMilestoneData = event.getConstant("Garden").cropMilestones
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt
index 7b2819570fd1..691a3c8e262b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.GardenJson
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
@@ -25,10 +26,11 @@ import kotlinx.coroutines.launch
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object GardenCropMilestonesCommunityFix {
private val amountPattern by RepoPattern.pattern(
"data.garden.milestonefix.amount",
- ".*§e(?.*)§6/§e(?.*)"
+ ".*§e(?.*)§6/§e(?.*)",
)
private var showWrongData = false
@@ -37,7 +39,7 @@ object GardenCropMilestonesCommunityFix {
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
val data = event.getConstant("Garden")
- val map = data.crop_milestone_community_help ?: return
+ val map = data.cropMilestoneCommunityHelp
for ((key, value) in map) {
if (key == "show_wrong_data") {
showWrongData = value
@@ -65,7 +67,7 @@ object GardenCropMilestonesCommunityFix {
ChatUtils.chat(
"Found §c${data.size} §ewrong crop milestone steps in the menu! " +
"Correct data got put into clipboard. " +
- "Please share it on the §bSkyHanni Discord §ein the channel §b#share-data§e."
+ "Please share it on the §bSkyHanni Discord §ein the channel §b#share-data§e.",
)
OSUtils.copyToClipboard("```${data.joinToString("\n")}```")
} else {
@@ -91,8 +93,8 @@ object GardenCropMilestonesCommunityFix {
// debug("crop: $crop")
// debug("realTier: $realTier")
- val guessNextMax = GardenCropMilestones.getCropsForTier(realTier + 1, crop) - GardenCropMilestones.getCropsForTier(realTier, crop)
-// debug("guessNextMax: ${guessNextMax.addSeparators()}")
+ val guessNextMax = nextMax(realTier, crop)
+ // debug("guessNextMax: ${guessNextMax.addSeparators()}")
val nextMax = amountPattern.matchMatcher(next) {
group("max").formatLong()
} ?: return
@@ -112,7 +114,7 @@ object GardenCropMilestonesCommunityFix {
// debug("$crop total offf by: ${totalOffBy.addSeparators()}")
}
-// fun debug(message: String) {
+ // fun debug(message: String) {
// if (SkyHanniMod.feature.dev.debug.enabled) {
// println(message)
// }
@@ -160,7 +162,7 @@ object GardenCropMilestonesCommunityFix {
}
private fun tryFix(crop: CropType, tier: Int, amount: Int): Boolean {
- val guessNextMax = GardenCropMilestones.getCropsForTier(tier + 1, crop) - GardenCropMilestones.getCropsForTier(tier, crop)
+ val guessNextMax = nextMax(tier, crop)
if (guessNextMax.toInt() == amount) return false
GardenCropMilestones.cropMilestoneData = GardenCropMilestones.cropMilestoneData.editCopy {
fix(crop, this, tier, amount)
@@ -168,6 +170,9 @@ object GardenCropMilestonesCommunityFix {
return true
}
+ private fun nextMax(tier: Int, crop: CropType): Long =
+ GardenCropMilestones.getCropsForTier(tier + 1, crop) - GardenCropMilestones.getCropsForTier(tier, crop)
+
private fun fix(crop: CropType, map: MutableMap>, tier: Int, amount: Int) {
map[crop] = map[crop]!!.editCopy {
this[tier] = amount
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
index 35a8787918da..5728ce5024f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.features.garden.GardenAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.NumberUtil.formatInt
@@ -13,6 +14,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object GardenCropUpgrades {
private val patternGroup = RepoPattern.group("garden.cropupgrades")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
index c0cd463658fe..782f3224a95b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt
@@ -1,9 +1,12 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.NEURenderEvent
+import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
import io.github.moulberry.notenoughupdates.NEUApi
@@ -13,26 +16,26 @@ import net.minecraftforge.client.event.GuiOpenEvent
import net.minecraftforge.client.event.GuiScreenEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import net.minecraftforge.fml.common.network.FMLNetworkEvent
import org.lwjgl.input.Keyboard
+@SkyHanniModule
object GuiData {
- var preDrawEventCanceled = false
+ var preDrawEventCancelled = false
@SubscribeEvent(priority = EventPriority.HIGH)
fun onNeuRenderEvent(event: NEURenderEvent) {
- if (preDrawEventCanceled) event.cancel()
+ if (preDrawEventCancelled) event.cancel()
}
@SubscribeEvent(priority = EventPriority.HIGH)
fun onClick(event: GuiContainerEvent.SlotClickEvent) {
- if (preDrawEventCanceled) event.cancel()
+ if (preDrawEventCancelled) event.cancel()
}
@SubscribeEvent(priority = EventPriority.HIGH)
fun onGuiClick(event: GuiScreenEvent.MouseInputEvent.Pre) {
- if (preDrawEventCanceled) event.isCanceled = true
+ if (preDrawEventCancelled) event.isCanceled = true
}
@SubscribeEvent(priority = EventPriority.HIGH)
@@ -41,31 +44,31 @@ object GuiData {
Keyboard.KEY_ESCAPE to it.keyBindInventory.keyCode
}
if (escKey.isKeyHeld() || invKey.isKeyHeld()) return
- if (preDrawEventCanceled) event.isCanceled = true
+ if (preDrawEventCancelled) event.isCanceled = true
}
@SubscribeEvent
fun onInventoryClose(event: InventoryCloseEvent) {
DelayedRun.runNextTick {
if (Minecraft.getMinecraft().currentScreen !is GuiChest) {
- preDrawEventCanceled = false
+ preDrawEventCancelled = false
}
}
}
@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
- preDrawEventCanceled = false
+ preDrawEventCancelled = false
}
- @SubscribeEvent
- fun onDisconnect(event: FMLNetworkEvent.ClientDisconnectionFromServerEvent) {
- preDrawEventCanceled = false
+ @HandleEvent
+ fun onDisconnect(event: ClientDisconnectEvent) {
+ preDrawEventCancelled = false
}
@SubscribeEvent(priority = EventPriority.LOW)
fun onGuiOpen(event: GuiOpenEvent) {
- if (preDrawEventCanceled) {
+ if (preDrawEventCancelled) {
NEUApi.setInventoryButtonsToDisabled()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
index 38da02e08b88..9f249ee7a04f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.GuiPositionMovedEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign
@@ -31,10 +32,15 @@ import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
-class GuiEditManager {
+@SkyHanniModule
+object GuiEditManager {
private var lastHotkeyPressed = SimpleTimeMark.farPast()
+ private var currentPositions = TimeLimitedCache(15.seconds)
+ private var currentBorderSize = mutableMapOf>()
+ private var lastMovedGui: String? = null
+
@SubscribeEvent
fun onKeyClick(event: LorenzKeyPressEvent) {
if (event.keyCode != SkyHanniMod.feature.gui.keyBindOpen) return
@@ -71,77 +77,70 @@ class GuiEditManager {
}
}
- companion object {
-
- private var currentPositions = TimeLimitedCache(15.seconds)
- private var currentBorderSize = mutableMapOf>()
- private var lastMovedGui: String? = null
-
- @JvmStatic
- fun add(position: Position, posLabel: String, x: Int, y: Int) {
- var name = position.internalName
- if (name == null) {
- name = if (posLabel == "none") "none " + UUID.randomUUID() else posLabel
- position.internalName = name
- }
- currentPositions[name] = position
- currentBorderSize[posLabel] = Pair(x, y)
+ @JvmStatic
+ fun add(position: Position, posLabel: String, x: Int, y: Int) {
+ var name = position.internalName
+ if (name == null) {
+ name = if (posLabel == "none") "none " + UUID.randomUUID() else posLabel
+ position.internalName = name
}
+ currentPositions[name] = position
+ currentBorderSize[posLabel] = Pair(x, y)
+ }
- private var lastHotkeyReminded = SimpleTimeMark.farPast()
-
- @JvmStatic
- fun openGuiPositionEditor(hotkeyReminder: Boolean) {
- SkyHanniMod.screenToOpen = GuiPositionEditor(
- currentPositions.values().toList(),
- 2,
- Minecraft.getMinecraft().currentScreen as? GuiContainer
+ private var lastHotkeyReminded = SimpleTimeMark.farPast()
+
+ @JvmStatic
+ fun openGuiPositionEditor(hotkeyReminder: Boolean) {
+ SkyHanniMod.screenToOpen = GuiPositionEditor(
+ currentPositions.values().toList(),
+ 2,
+ Minecraft.getMinecraft().currentScreen as? GuiContainer
+ )
+ if (hotkeyReminder && lastHotkeyReminded.passedSince() > 30.minutes) {
+ lastHotkeyReminded = SimpleTimeMark.now()
+ ChatUtils.chat(
+ "§eTo edit hidden GUI elements:\n" +
+ " §7- §e1. Set a key in /sh edit.\n" +
+ " §7- §e2. Click that key while the GUI element is visible."
)
- if (hotkeyReminder && lastHotkeyReminded.passedSince() > 30.minutes) {
- lastHotkeyReminded = SimpleTimeMark.now()
- ChatUtils.chat(
- "§eTo edit hidden GUI elements:\n" +
- " §7- §e1. Set a key in /sh edit.\n" +
- " §7- §e2. Click that key while the GUI element is visible."
- )
- }
}
+ }
- @JvmStatic
- fun renderLast() {
- if (!isInGui()) return
- if (!SkyHanniDebugsAndTests.globalRender) return
+ @JvmStatic
+ fun renderLast() {
+ if (!isInGui()) return
+ if (!SkyHanniDebugsAndTests.globalRender) return
- GlStateManager.translate(0f, 0f, 200f)
+ GlStateManager.translate(0f, 0f, 200f)
- GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch()
+ GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch()
- GlStateManager.pushMatrix()
- GlStateManager.enableDepth()
- GuiRenderEvent.ChestGuiOverlayRenderEvent().postAndCatch()
- GlStateManager.popMatrix()
+ GlStateManager.pushMatrix()
+ GlStateManager.enableDepth()
+ GuiRenderEvent.ChestGuiOverlayRenderEvent().postAndCatch()
+ GlStateManager.popMatrix()
- GlStateManager.translate(0f, 0f, -200f)
- }
+ GlStateManager.translate(0f, 0f, -200f)
+ }
- fun isInGui() = Minecraft.getMinecraft().currentScreen is GuiPositionEditor
+ fun isInGui() = Minecraft.getMinecraft().currentScreen is GuiPositionEditor
- fun Position.getDummySize(random: Boolean = false): Vector2i {
- if (random) return Vector2i(5, 5)
- val (x, y) = currentBorderSize[internalName] ?: return Vector2i(1, 1)
- return Vector2i((x * effectiveScale).toInt(), (y * effectiveScale).toInt())
- }
+ fun Position.getDummySize(random: Boolean = false): Vector2i {
+ if (random) return Vector2i(5, 5)
+ val (x, y) = currentBorderSize[internalName] ?: return Vector2i(1, 1)
+ return Vector2i((x * effectiveScale).toInt(), (y * effectiveScale).toInt())
+ }
- fun Position.getAbsX() = getAbsX0(getDummySize(true).x)
+ fun Position.getAbsX() = getAbsX0(getDummySize(true).x)
- fun Position.getAbsY() = getAbsY0(getDummySize(true).y)
+ fun Position.getAbsY() = getAbsY0(getDummySize(true).y)
- fun GuiProfileViewer.anyTextBoxFocused() =
- this.getPropertiesWithType().any { it.focus }
+ fun GuiProfileViewer.anyTextBoxFocused() =
+ this.getPropertiesWithType().any { it.focus }
- fun handleGuiPositionMoved(guiName: String) {
- lastMovedGui = guiName
- }
+ fun handleGuiPositionMoved(guiName: String) {
+ lastMovedGui = guiName
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt
index f4273e745e17..541eb323cf8f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt
@@ -1,9 +1,11 @@
package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object GuildAPI {
private var inGuildMessage = false
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt
index 9e99fdbae7c1..c5aa22e66fd7 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryOpenEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -10,6 +11,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object HighlightOnHoverSlot {
val currentSlots = mutableMapOf, List>()
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt
index 841e39c17920..8c6db7df0de5 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ConditionalUtils.transformIf
@@ -42,188 +43,289 @@ enum class HotmData(
val rewardFun: ((Int) -> (Map)),
) {
- MINING_SPEED("Mining Speed",
+ MINING_SPEED(
+ "Mining Speed",
50,
{ currentLevel -> (currentLevel + 2.0).pow(3) },
- { level -> mapOf(HotmReward.MINING_SPEED to level * 20.0) }),
- MINING_FORTUNE("Mining Fortune",
+ { level -> mapOf(HotmReward.MINING_SPEED to level * 20.0) },
+ ),
+ MINING_FORTUNE(
+ "Mining Fortune",
50,
{ currentLevel -> (currentLevel + 2.0).pow(3.05) },
- { level -> mapOf(HotmReward.MINING_FORTUNE to level * 5.0) }),
- QUICK_FORGE("Quick Forge",
+ { level -> mapOf(HotmReward.MINING_FORTUNE to level * 5.0) },
+ ),
+ QUICK_FORGE(
+ "Quick Forge",
20,
{ currentLevel -> (currentLevel + 2.0).pow(4) },
- { level -> mapOf(HotmReward.FORGE_TIME_DECREASE to 10.0 + (level * 0.5)) }),
- TITANIUM_INSANIUM("Titanium Insanium",
+ { level -> mapOf(HotmReward.FORGE_TIME_DECREASE to 10.0 + (level * 0.5)) },
+ ),
+ TITANIUM_INSANIUM(
+ "Titanium Insanium",
50,
{ currentLevel -> (currentLevel + 2.0).pow(3.1) },
- { level -> mapOf(HotmReward.TITANIUM_CHANCE to 2.0 + (level * 0.1)) }),
- DAILY_POWDER("Daily Powder",
+ { level -> mapOf(HotmReward.TITANIUM_CHANCE to 2.0 + (level * 0.1)) },
+ ),
+ DAILY_POWDER(
+ "Daily Powder",
100,
{ currentLevel -> 200.0 + (currentLevel * 18.0) },
- { level -> mapOf(HotmReward.DAILY_POWDER to (200.0 + ((level - 1.0) * 18.0)) * 2.0) }),
- LUCK_OF_THE_CAVE("Luck of the Cave",
+ { level -> mapOf(HotmReward.DAILY_POWDER to (200.0 + ((level - 1.0) * 18.0)) * 2.0) },
+ ),
+ LUCK_OF_THE_CAVE(
+ "Luck of the Cave",
45,
{ currentLevel -> (currentLevel + 2.0).pow(3.07) },
- { level -> mapOf(HotmReward.EXTRA_CHANCE_TRIGGER_RARE_OCCURRENCES to 5.0 + level) }),
- CRYSTALLIZED("Crystallized", 30, { currentLevel -> (currentLevel + 2.0).pow(3.4) }, { level ->
- mapOf(
- HotmReward.MINING_SPEED to 20.0 + ((level - 1.0) * 6.0),
- HotmReward.MINING_FORTUNE to 20.0 + ((level - 1.0) * 5.0)
- )
- }),
- EFFICIENT_MINER("Efficient Miner",
+ { level -> mapOf(HotmReward.EXTRA_CHANCE_TRIGGER_RARE_OCCURRENCES to 5.0 + level) },
+ ),
+ CRYSTALLIZED(
+ "Crystallized",
+ 30,
+ { currentLevel -> (currentLevel + 2.0).pow(3.4) },
+ { level ->
+ mapOf(
+ HotmReward.MINING_SPEED to 20.0 + ((level - 1.0) * 6.0),
+ HotmReward.MINING_FORTUNE to 20.0 + ((level - 1.0) * 5.0),
+ )
+ },
+ ),
+ EFFICIENT_MINER(
+ "Efficient Miner",
100,
{ currentLevel -> (currentLevel + 2.0).pow(2.6) },
- { level -> mapOf(HotmReward.AVERAGE_BLOCK_BREAKS to (10.0 + (level * 0.4)) * (1.0 + (level * 0.05))) }),
- ORBITER("Orbiter",
+ { level -> mapOf(HotmReward.AVERAGE_BLOCK_BREAKS to (10.0 + (level * 0.4)) * (1.0 + (level * 0.05))) },
+ ),
+ ORBITER(
+ "Orbiter",
80,
{ currentLevel -> (currentLevel + 1.0) * 70.0 },
- { level -> mapOf(HotmReward.CHANCE_EXTRA_XP_ORBS to 0.2 + (level * 0.01)) }),
- SEASONED_MINEMAN("Seasoned Mineman",
+ { level -> mapOf(HotmReward.CHANCE_EXTRA_XP_ORBS to 0.2 + (level * 0.01)) },
+ ),
+ SEASONED_MINEMAN(
+ "Seasoned Mineman",
100,
{ currentLevel -> (currentLevel + 2.0).pow(2.3) },
- { level -> mapOf(HotmReward.MINING_WISDOM to 5.0 + (level * 0.1)) }),
- MOLE("Mole",
+ { level -> mapOf(HotmReward.MINING_WISDOM to 5.0 + (level * 0.1)) },
+ ),
+ MOLE(
+ "Mole",
190,
{ currentLevel -> (currentLevel + 2.0).pow(2.2) },
- { level -> mapOf(HotmReward.AVERAGE_BLOCK_BREAKS to 1.0 + ((level + 9.0) * 0.05 * ((level + 8) % 20))) }),
- PROFESSIONAL("Professional",
+ { level -> mapOf(HotmReward.AVERAGE_BLOCK_BREAKS to 1.0 + ((level + 9.0) * 0.05 * ((level + 8) % 20))) },
+ ),
+ PROFESSIONAL(
+ "Professional",
140,
{ currentLevel -> (currentLevel + 2.0).pow(2.3) },
- { level -> mapOf(HotmReward.MINING_SPEED to 50.0 + (level * 5.0)) }),
- LONESOME_MINER("Lonesome Miner",
+ { level -> mapOf(HotmReward.MINING_SPEED to 50.0 + (level * 5.0)) },
+ ),
+ LONESOME_MINER(
+ "Lonesome Miner",
45,
{ currentLevel -> (currentLevel + 2.0).pow(3.07) },
- { level -> mapOf(HotmReward.COMBAT_STAT_BOOST to 5.0 + ((level - 1.0) * 0.5)) }),
- GREAT_EXPLORER("Great Explorer", 20, { currentLevel -> (currentLevel + 2.0).pow(4.0) }, { level ->
- mapOf(
- HotmReward.CHANCE_OF_TREASURE_CHEST to (0.2 * (0.2 + 0.04 * (level - 1.0))),
- HotmReward.LOCKS_OF_TREASURE_CHEST to 1 + level * 0.2
- )
- }),
- FORTUNATE("Fortunate",
+ { level -> mapOf(HotmReward.COMBAT_STAT_BOOST to 5.0 + ((level - 1.0) * 0.5)) },
+ ),
+ GREAT_EXPLORER(
+ "Great Explorer",
+ 20,
+ { currentLevel -> (currentLevel + 2.0).pow(4.0) },
+ { level ->
+ mapOf(
+ HotmReward.CHANCE_OF_TREASURE_CHEST to (0.2 * (0.2 + 0.04 * (level - 1.0))),
+ HotmReward.LOCKS_OF_TREASURE_CHEST to 1 + level * 0.2,
+ )
+ },
+ ),
+ FORTUNATE(
+ "Fortunate",
20,
{ currentLevel -> (currentLevel + 1.0).pow(3.05) },
- { level -> mapOf(HotmReward.MINING_FORTUNE to 20.0 + (level * 4.0)) }),
- POWDER_BUFF("Powder Buff", 50, { currentLevel -> (currentLevel + 1.0).pow(3.2) }, { level ->
- mapOf(
- HotmReward.MORE_MITHRIL_POWER to level.toDouble(), HotmReward.MORE_GEMSTONE_POWER to level.toDouble()
- )
- }),
- MINING_SPEED_II("Mining Speed II",
+ { level -> mapOf(HotmReward.MINING_FORTUNE to 20.0 + (level * 4.0)) },
+ ),
+ POWDER_BUFF(
+ "Powder Buff",
+ 50,
+ { currentLevel -> (currentLevel + 1.0).pow(3.2) },
+ { level ->
+ mapOf(
+ HotmReward.MORE_MITHRIL_POWER to level.toDouble(),
+ HotmReward.MORE_GEMSTONE_POWER to level.toDouble(),
+ )
+ },
+ ),
+ MINING_SPEED_II(
+ "Mining Speed II",
50,
{ currentLevel -> (currentLevel + 2.0).pow(3.2) },
- { level -> mapOf(HotmReward.MINING_SPEED to level * 40.0) }),
- MINING_FORTUNE_II("Mining Fortune II",
+ { level -> mapOf(HotmReward.MINING_SPEED to level * 40.0) },
+ ),
+ MINING_FORTUNE_II(
+ "Mining Fortune II",
50,
{ currentLevel -> (currentLevel + 2.0).pow(3.2) },
- { level -> mapOf(HotmReward.MINING_FORTUNE to level * 5.0) }),
+ { level -> mapOf(HotmReward.MINING_FORTUNE to level * 5.0) },
+ ),
// Static
- MINING_MADNESS("Mining Madness", 1, { null }, {
- mapOf(
- HotmReward.MINING_SPEED to 50.0, HotmReward.MINING_FORTUNE to 50.0
- )
- }),
+ MINING_MADNESS(
+ "Mining Madness",
+ 1,
+ { null },
+ {
+ mapOf(
+ HotmReward.MINING_SPEED to 50.0,
+ HotmReward.MINING_FORTUNE to 50.0,
+ )
+ },
+ ),
SKY_MALL("Sky Mall", 1, { null }, { emptyMap() }),
PRECISION_MINING("Precision Mining", 1, { null }, { mapOf(HotmReward.MINING_SPEED_BOOST to 30.0) }),
- FRONT_LOADED("Front Loaded", 1, { null }, {
- mapOf(
- HotmReward.MINING_SPEED to 100.0,
- HotmReward.MINING_FORTUNE to 100.0,
- HotmReward.MORE_BASE_MITHRIL_POWER to 2.0,
- HotmReward.MORE_BASE_GEMSTONE_POWER to 2.0
- )
- }),
+ FRONT_LOADED(
+ "Front Loaded",
+ 1,
+ { null },
+ {
+ mapOf(
+ HotmReward.MINING_SPEED to 100.0,
+ HotmReward.MINING_FORTUNE to 100.0,
+ HotmReward.MORE_BASE_MITHRIL_POWER to 2.0,
+ HotmReward.MORE_BASE_GEMSTONE_POWER to 2.0,
+ )
+ },
+ ),
STAR_POWDER("Star Powder", 1, { null }, { mapOf(HotmReward.MORE_MITHRIL_POWER to 300.0) }),
GOBLIN_KILLER("Goblin Killer", 1, { null }, { emptyMap() }),
// Abilities
- PICKOBULUS("Pickobulus", 3, { null }, { level ->
- mapOf(
- HotmReward.ABILITY_RADIUS to ceil(level * 0.5) + 1.0,
- HotmReward.ABILITY_COOLDOWN to 130.0 - 10.0 * level
- )
- }),
- MINING_SPEED_BOOST("Mining Speed Boost", 3, { null }, { level ->
- mapOf(
- HotmReward.ABILITY_DURATION to level + 1.0, HotmReward.ABILITY_COOLDOWN to 10.0 + 5.0 * level
- )
- }),
- VEIN_SEEKER("Vein Seeker", 3, { null }, { level ->
- mapOf(
- HotmReward.ABILITY_RADIUS to level + 1.0,
- HotmReward.ABILITY_DURATION to 10.0 + 2.0 * level,
- HotmReward.ABILITY_COOLDOWN to 60.0
- )
- }),
- MANIAC_MINER("Maniac Miner", 3, { null }, { level ->
- mapOf(
- HotmReward.ABILITY_DURATION to 5.0 + level * 5.0, HotmReward.ABILITY_COOLDOWN to 60.0 - level
- )
- }),
+ PICKOBULUS(
+ "Pickobulus",
+ 3,
+ { null },
+ { level ->
+ mapOf(
+ HotmReward.ABILITY_RADIUS to ceil(level * 0.5) + 1.0,
+ HotmReward.ABILITY_COOLDOWN to 130.0 - 10.0 * level,
+ )
+ },
+ ),
+ MINING_SPEED_BOOST(
+ "Mining Speed Boost",
+ 3,
+ { null },
+ { level ->
+ mapOf(
+ HotmReward.ABILITY_DURATION to level + 1.0,
+ HotmReward.ABILITY_COOLDOWN to 10.0 + 5.0 * level,
+ )
+ },
+ ),
+ VEIN_SEEKER(
+ "Vein Seeker",
+ 3,
+ { null },
+ { level ->
+ mapOf(
+ HotmReward.ABILITY_RADIUS to level + 1.0,
+ HotmReward.ABILITY_DURATION to 10.0 + 2.0 * level,
+ HotmReward.ABILITY_COOLDOWN to 60.0,
+ )
+ },
+ ),
+ MANIAC_MINER(
+ "Maniac Miner",
+ 3,
+ { null },
+ { level ->
+ mapOf(
+ HotmReward.ABILITY_DURATION to 5.0 + level * 5.0,
+ HotmReward.ABILITY_COOLDOWN to 60.0 - level,
+ )
+ },
+ ),
PEAK_OF_THE_MOUNTAIN("Peak of the Mountain", 10, { null }, { emptyMap() }),
// Mining V3
- DAILY_GRIND("Daily Grind",
+ DAILY_GRIND(
+ "Daily Grind",
100,
{ currentLevel -> 218.0 + (18.0 * (currentLevel - 2.0)) },
- { level -> mapOf(HotmReward.DAILY_POWDER to 50.0 * level) }),
+ { level -> mapOf(HotmReward.DAILY_POWDER to 50.0 * level) },
+ ),
DUST_COLLECTOR(
"Dust Collector",
20,
{ currentLevel -> (currentLevel + 1.0).pow(4) },
- { level -> mapOf(HotmReward.FOSSIL_DUST to 1.0 * level) }),
- WARM_HEARTED("Warm Hearted",
+ { level -> mapOf(HotmReward.FOSSIL_DUST to 1.0 * level) },
+ ),
+ WARM_HEARTED(
+ "Warm Hearted",
50,
{ currentLevel -> floor((currentLevel + 1.0).pow(3.1)) },
- { level -> mapOf(HotmReward.COLD_RESISTANCE to 0.2 * level) }),
+ { level -> mapOf(HotmReward.COLD_RESISTANCE to 0.2 * level) },
+ ),
- STRONG_ARM("Strong Arm",
+ STRONG_ARM(
+ "Strong Arm",
100,
{ currentLevel -> floor((currentLevel + 1.0).pow(2.3)) },
- { level -> mapOf(HotmReward.MINING_SPEED to 5.0 * level) }),
- NO_STONE_UNTURNED("No Stone Unturned",
+ { level -> mapOf(HotmReward.MINING_SPEED to 5.0 * level) },
+ ),
+ NO_STONE_UNTURNED(
+ "No Stone Unturned",
50,
{ currentLevel -> floor((currentLevel + 1.0).pow(3.05)) },
- { level -> mapOf(HotmReward.UNKNOWN to 0.5 * level) }),
+ { level -> mapOf(HotmReward.UNKNOWN to 0.5 * level) },
+ ),
- SUB_ZERO_MINING("SubZero Mining",
+ SUB_ZERO_MINING(
+ "SubZero Mining",
100,
{ currentLevel -> floor((currentLevel + 1.0).pow(2.3)) },
- { level -> mapOf(HotmReward.MINING_FORTUNE to 1.0 * level) }),
- SURVEYOR("Surveyor",
+ { level -> mapOf(HotmReward.MINING_FORTUNE to 1.0 * level) },
+ ),
+ SURVEYOR(
+ "Surveyor",
20,
{ currentLevel -> (currentLevel + 1.0).pow(4) },
- { level -> mapOf(HotmReward.UNKNOWN to 0.75 * level) }),
- EAGER_ADVENTURER("Eager Adventurer",
+ { level -> mapOf(HotmReward.UNKNOWN to 0.75 * level) },
+ ),
+ EAGER_ADVENTURER(
+ "Eager Adventurer",
100,
{ currentLevel -> floor((currentLevel + 1.0).pow(2.3)) },
- { level -> mapOf(HotmReward.MINING_SPEED to 2.0 * level) }),
+ { level -> mapOf(HotmReward.MINING_SPEED to 2.0 * level) },
+ ),
- DEAD_MANS_CHEST("Dead Man's Chest",
+ DEAD_MANS_CHEST(
+ "Dead Man's Chest",
50,
{ currentLevel -> floor((currentLevel + 1.0).pow(3.2)) },
- { level -> mapOf(HotmReward.UNKNOWN to 1.0 * level) }),
+ { level -> mapOf(HotmReward.UNKNOWN to 1.0 * level) },
+ ),
- GIFTS_FROM_THE_DEPARTED("Gifts from the Departed",
+ GIFTS_FROM_THE_DEPARTED(
+ "Gifts from the Departed",
100,
{ currentLevel -> floor((currentLevel + 1.0).pow(2.45)) },
- { level -> mapOf(HotmReward.UNKNOWN to 0.2 * level) }),
+ { level -> mapOf(HotmReward.UNKNOWN to 0.2 * level) },
+ ),
EXCAVATOR(
"Excavator",
50,
{ currentLevel -> (currentLevel + 1.0).pow(3) },
- { level -> mapOf(HotmReward.UNKNOWN to 0.5 * level) }),
- RAGS_TO_RICHES("Rags to Riches",
+ { level -> mapOf(HotmReward.UNKNOWN to 0.5 * level) },
+ ),
+ RAGS_TO_RICHES(
+ "Rags to Riches",
50,
{ currentLevel -> floor((currentLevel + 1.0).pow(3.05)) },
- { level -> mapOf(HotmReward.MINING_FORTUNE to 2.0 * level) }),
+ { level -> mapOf(HotmReward.MINING_FORTUNE to 2.0 * level) },
+ ),
KEEN_EYE("Keen Eye", 1, { null }, { emptyMap() }),
MINESHAFT_MAYHEM("Mineshaft Mayhem", 1, { null }, { emptyMap() }),
@@ -246,6 +348,9 @@ enum class HotmData(
storage?.perks?.computeIfAbsent(this.name) { HotmTree.HotmPerk() }?.level = value
}
+ val isMaxLevel: Boolean
+ get() = activeLevel >= maxLevel // >= to account for +1 from Blue Cheese
+
private fun blueEgg() = if (this != PEAK_OF_THE_MOUNTAIN && maxLevel != 1 && HotmAPI.isBlueEggActive) 1 else 0
var enabled: Boolean
@@ -267,6 +372,8 @@ enum class HotmData(
fun getReward() = rewardFun(activeLevel)
+ // TODO move all object functions into hotm api?
+ @SkyHanniModule
companion object {
val storage get() = ProfileStorageData.profileSpecific?.mining?.hotmTree
@@ -275,49 +382,62 @@ enum class HotmData(
listOf(PICKOBULUS, MINING_SPEED_BOOST, VEIN_SEEKER, MANIAC_MINER, HAZARDOUS_MINER, GEMSTONE_INFUSION)
private val inventoryPattern by patternGroup.pattern(
- "inventory", "Heart of the Mountain"
+ "inventory",
+ "Heart of the Mountain",
)
private val levelPattern by patternGroup.pattern(
- "perk.level", "§(?.)Level (?\\d+).*"
+ "perk.level",
+ "§(?.)Level (?\\d+).*",
)
private val notUnlockedPattern by patternGroup.pattern(
- "perk.notunlocked", "(§.)*Requires.*|.*Mountain!|(§.)*Click to unlock!|"
+ "perk.notunlocked",
+ "(§.)*Requires.*|.*Mountain!|(§.)*Click to unlock!|",
)
private val enabledPattern by patternGroup.pattern(
- "perk.enable", "§a§lENABLED|(§.)*SELECTED"
+ "perk.enable",
+ "§a§lENABLED|(§.)*SELECTED",
)
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, but the value might be useful in the future or for debugging
+ "perk.disabled",
+ "§c§lDISABLED|§7§eClick to select!",
+ ) // 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
private val resetChatPattern by patternGroup.pattern(
- "reset.chat", "§aReset your §r§5Heart of the Mountain§r§a! Your Perks and Abilities have been reset."
+ "reset.chat",
+ "§aReset your §r§5Heart of the Mountain§r§a! Your Perks and Abilities have been reset.",
)
private val heartItemPattern by patternGroup.pattern(
- "inventory.heart", "§5Heart of the Mountain"
+ "inventory.heart",
+ "§5Heart of the Mountain",
)
private val resetItemPattern by patternGroup.pattern(
- "inventory.reset", "§cReset Heart of the Mountain"
+ "inventory.reset",
+ "§cReset Heart of the Mountain",
)
private val heartTokensPattern by patternGroup.pattern(
- "inventory.heart.token", "§7Token of the Mountain: §5(?\\d+)"
+ "inventory.heart.token",
+ "§7Token of the Mountain: §5(?\\d+)",
)
private val resetTokensPattern by patternGroup.pattern(
- "inventory.reset.token", "\\s+§8- §5(?\\d+) Token of the Mountain"
+ "inventory.reset.token",
+ "\\s+§8- §5(?\\d+) Token of the Mountain",
)
private val skymallPattern by patternGroup.pattern(
- "skymall", "(?:§eNew buff§r§r§r: §r§f|§8 ■ §7)(?.*)"
+ "skymall",
+ "(?:§eNew buff§r§r§r: §r§f|§8 ■ §7)(?.*)",
)
private val mayhemChatPattern by patternGroup.pattern(
- "mayhem", "§b§lMAYHEM! §r§7(?.*)"
+ "mayhem",
+ "§b§lMAYHEM! §r§7(?.*)",
)
var inInventory = false
@@ -447,20 +567,23 @@ enum class HotmData(
}
private val skyMallCurrentEffect by patternGroup.pattern(
- "skymall.current", "§aYour Current Effect"
+ "skymall.current",
+ "§aYour Current Effect",
)
private fun handelSkyMall(lore: List) {
if (!SKY_MALL.enabled || !SKY_MALL.isUnlocked) HotmAPI.skymall = null
else {
- val index = (lore.indexOfFirstMatch(skyMallCurrentEffect) ?: run {
- ErrorManager.logErrorStateWithData(
- "Could not read the skymall effect from the hotm tree",
- "skyMallCurrentEffect didn't match",
- "lore" to lore
- )
- return
- }) + 1
+ val index = (
+ lore.indexOfFirstMatch(skyMallCurrentEffect) ?: run {
+ ErrorManager.logErrorStateWithData(
+ "Could not read the skymall effect from the hotm tree",
+ "skyMallCurrentEffect didn't match",
+ "lore" to lore,
+ )
+ return
+ }
+ ) + 1
skymallPattern.matchMatcher(lore[index]) {
val perk = group("perk")
HotmAPI.skymall = SkymallPerk.entries.firstOrNull { it.itemPattern.matches(perk) } ?: run {
@@ -468,7 +591,7 @@ enum class HotmData(
"Could not read the skymall effect from the hotm tree",
"no itemPattern matched",
"lore" to lore,
- "perk" to perk
+ "perk" to perk,
)
null
}
@@ -526,7 +649,7 @@ enum class HotmData(
"Could not read the skymall effect from chat",
"no chatPattern matched",
"chat" to event.message,
- "perk" to perk
+ "perk" to perk,
)
null
}
@@ -541,7 +664,7 @@ enum class HotmData(
"Could not read the mayhem effect from chat",
"no chatPattern matched",
"chat" to event.message,
- "perk" to perk
+ "perk" to perk,
)
null
}
@@ -562,7 +685,8 @@ enum class HotmData(
HotmAPI.Powder.entries.forEach {
if (it.getStorage() == null) {
ProfileStorageData.profileSpecific?.mining?.powder?.put(
- it, ProfileSpecificStorage.MiningConfig.PowderStorage()
+ it,
+ ProfileSpecificStorage.MiningConfig.PowderStorage(),
)
}
}
@@ -582,9 +706,11 @@ enum class HotmData(
add("Mineshaft Mayhem: ${HotmAPI.mineshaftMayhem}")
}
event.title("HotM - Tree")
- event.addIrrelevant(entries.filter { it.isUnlocked }.map {
- "${if (it.enabled) "✔" else "✖"} ${it.printName}: ${it.activeLevel}"
- })
+ event.addIrrelevant(
+ entries.filter { it.isUnlocked }.map {
+ "${if (it.enabled) "✔" else "✖"} ${it.printName}: ${it.activeLevel}"
+ },
+ )
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
index dbf153c57c11..0e2f9af32842 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.config.ConfigManager.Companion.gson
import at.hannibal2.skyhanni.data.model.TabWidget
import at.hannibal2.skyhanni.events.HypixelJoinEvent
@@ -11,6 +12,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
import at.hannibal2.skyhanni.events.WidgetUpdateEvent
+import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent
import at.hannibal2.skyhanni.features.bingo.BingoAPI
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI
@@ -30,7 +32,6 @@ import com.google.gson.JsonObject
import io.github.moulberry.notenoughupdates.NotEnoughUpdates
import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import net.minecraftforge.fml.common.network.FMLNetworkEvent
import kotlin.concurrent.thread
import kotlin.time.Duration.Companion.seconds
@@ -38,7 +39,8 @@ class HypixelData {
private val patternGroup = RepoPattern.group("data.hypixeldata")
private val islandNamePattern by patternGroup.pattern(
- "islandname", "(?:§.)*(Area|Dungeon): (?:§.)*(?.*)"
+ "islandname",
+ "(?:§.)*(Area|Dungeon): (?:§.)*(?.*)",
)
private var lastLocRaw = SimpleTimeMark.farPast()
@@ -46,41 +48,52 @@ class HypixelData {
companion object {
private val patternGroup = RepoPattern.group("data.hypixeldata")
private val serverIdScoreboardPattern by patternGroup.pattern(
- "serverid.scoreboard", "§7\\d+/\\d+/\\d+ §8(?[mM])(?\\S+).*"
+ "serverid.scoreboard",
+ "§7\\d+/\\d+/\\d+ §8(?[mM])(?\\S+).*",
)
private val serverIdTablistPattern by patternGroup.pattern(
- "serverid.tablist", " Server: §r§8(?\\S+)"
+ "serverid.tablist",
+ " Server: §r§8(?\\S+)",
)
private val lobbyTypePattern by patternGroup.pattern(
- "lobbytype", "(?.*lobby)\\d+"
+ "lobbytype",
+ "(?.*lobby)\\d+",
)
private val playerAmountPattern by patternGroup.pattern(
- "playeramount", "^\\s*(?:§.)+Players (?:§.)+\\((?\\d+)\\)\\s*$"
+ "playeramount",
+ "^\\s*(?:§.)+Players (?:§.)+\\((?\\d+)\\)\\s*$",
)
private val playerAmountCoopPattern by patternGroup.pattern(
- "playeramount.coop", "^\\s*(?:§.)*Coop (?:§.)*\\((?\\d+)\\)\\s*$"
+ "playeramount.coop",
+ "^\\s*(?:§.)*Coop (?:§.)*\\((?\\d+)\\)\\s*$",
)
private val playerAmountGuestingPattern by patternGroup.pattern(
- "playeramount.guesting", "^\\s*(?:§.)*Guests (?:§.)*\\((?\\d+)\\)\\s*$"
+ "playeramount.guesting",
+ "^\\s*(?:§.)*Guests (?:§.)*\\((?\\d+)\\)\\s*$",
)
/**
* REGEX-TEST: §r§b§lParty §r§f(4)
*/
private val dungeonPartyAmountPattern by patternGroup.pattern(
- "playeramount.dungeonparty", "^\\s*(?:§.)+Party (?:§.)+\\((?\\d+)\\)\\s*$"
+ "playeramount.dungeonparty",
+ "^\\s*(?:§.)+Party (?:§.)+\\((?\\d+)\\)\\s*$",
)
private val soloProfileAmountPattern by patternGroup.pattern(
- "solo.profile.amount", "^\\s*(?:§.)*Island\\s*$"
+ "solo.profile.amount",
+ "^\\s*(?:§.)*Island\\s*$",
)
private val scoreboardVisitingAmoutPattern by patternGroup.pattern(
- "scoreboard.visiting.amount", "\\s+§.✌ §.\\(§.(?\\d+)§./(?\\d+)\\)"
+ "scoreboard.visiting.amount",
+ "\\s+§.✌ §.\\(§.(?\\d+)§./(?\\d+)\\)",
)
private val guestPattern by patternGroup.pattern(
- "guesting.scoreboard", "SKYBLOCK GUEST"
+ "guesting.scoreboard",
+ "SKYBLOCK GUEST",
)
private val scoreboardTitlePattern by patternGroup.pattern(
- "scoreboard.title", "SK[YI]BLOCK(?: CO-OP| GUEST)?"
+ "scoreboard.title",
+ "SK[YI]BLOCK(?: CO-OP| GUEST)?",
)
/**
@@ -88,7 +101,8 @@ class HypixelData {
* REGEX-TEST: §5ф §dWizard Tower
*/
private val skyblockAreaPattern by patternGroup.pattern(
- "skyblock.area", "\\s*§(?7⏣|5ф) §(?.)(?.*)"
+ "skyblock.area",
+ "\\s*§(?7⏣|5ф) §(?.)(?.*)",
)
var hypixelLive = false
@@ -115,8 +129,13 @@ class HypixelData {
// Data from locraw
var locrawData: JsonObject? = null
private var locraw: MutableMap = listOf(
- "server", "gametype", "lobbyname", "lobbytype", "mode", "map"
- ).associate { it to "" }.toMutableMap()
+ "server",
+ "gametype",
+ "lobbyname",
+ "lobbytype",
+ "mode",
+ "map",
+ ).associateWith { "" }.toMutableMap()
val server get() = locraw["server"] ?: ""
val gameType get() = locraw["gametype"] ?: ""
@@ -147,7 +166,7 @@ class HypixelData {
"Could not find server id",
"islandType" to LorenzUtils.skyBlockIsland,
"tablist" to TabListData.getTabList(),
- "scoreboard" to ScoreboardData.sidebarLinesFormatted
+ "scoreboard" to ScoreboardData.sidebarLinesFormatted,
)
}
@@ -235,8 +254,8 @@ class HypixelData {
skyBlockAreaWithSymbol = null
}
- @SubscribeEvent
- fun onDisconnect(event: FMLNetworkEvent.ClientDisconnectionFromServerEvent) {
+ @HandleEvent
+ fun onDisconnect(event: ClientDisconnectEvent) {
hypixelLive = false
hypixelAlpha = false
skyBlock = false
@@ -279,8 +298,8 @@ class HypixelData {
}
}
- @SubscribeEvent
// TODO rewrite everything in here
+ @SubscribeEvent
fun onTick(event: LorenzTickEvent) {
if (!LorenzUtils.inSkyBlock) {
// Modified from NEU.
diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt
index ff185d5ae460..4d36c1c0182e 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/IslandType.kt
@@ -26,6 +26,7 @@ enum class IslandType(val displayName: String) {
MINESHAFT("Mineshaft"),
NONE(""),
+ ANY(""),
UNKNOWN("???"),
;
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt
index 7025e17105cb..26658eee7cc9 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.SackChangeEvent
import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent
import at.hannibal2.skyhanni.features.inventory.SuperCraftFeatures.craftedPattern
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
@@ -19,11 +20,11 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
-class ItemAddManager {
+@SkyHanniModule
+object ItemAddManager {
enum class Source {
ITEM_ADD,
SACKS,
- ;
}
private val ARCHFIEND_DICE = "ARCHFIEND_DICE".asInternalName()
@@ -31,7 +32,7 @@ class ItemAddManager {
private val diceRollChatPattern by RepoPattern.pattern(
"data.itemmanager.diceroll",
- "§eYour §r§(5|6High Class )Archfiend Dice §r§erolled a §r§.(?.)§r§e! Bonus: §r§.(?.*)❤"
+ "§eYour §r§(5|6High Class )Archfiend Dice §r§erolled a §r§.(?.)§r§e! Bonus: §r§.(?.*)❤",
)
private var inSackInventory = false
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
index acd331cc8984..e7fa75331924 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt
@@ -1,9 +1,11 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.BlockClickEvent
import at.hannibal2.skyhanni.events.EntityClickEvent
import at.hannibal2.skyhanni.events.ItemClickEvent
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.toLorenzVec
import net.minecraft.client.Minecraft
@@ -11,14 +13,14 @@ import net.minecraft.network.play.client.C02PacketUseEntity
import net.minecraft.network.play.client.C07PacketPlayerDigging
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement
import net.minecraft.network.play.client.C0APacketAnimation
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class ItemClickData {
+@SkyHanniModule
+object ItemClickData {
- @SubscribeEvent
- fun onItemClickSend(event: PacketEvent.SendEvent) {
+ @HandleEvent
+ fun onItemClickSend(event: PacketSentEvent) {
val packet = event.packet
- event.isCanceled = when {
+ val cancelled = when {
packet is C08PacketPlayerBlockPlacement -> {
if (packet.placedBlockDirection != 255) {
val position = packet.position.toLorenzVec()
@@ -56,6 +58,10 @@ class ItemClickData {
return
}
}
+
+ if (cancelled) {
+ event.cancel()
+ }
}
/* @SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt
index 22d299f17e62..fbbd78e138ba 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.GuiRenderItemEvent
import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent
import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -16,7 +17,8 @@ import net.minecraft.inventory.ContainerChest
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class ItemTipHelper {
+@SkyHanniModule
+object ItemTipHelper {
@SubscribeEvent
fun onRenderItemOverlayPost(event: GuiRenderItemEvent.RenderOverlayEvent.GuiRenderItemPost) {
@@ -75,4 +77,4 @@ class ItemTipHelper {
GlStateManager.enableLighting()
GlStateManager.enableDepth()
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt
index 728678824dc9..129e1cd956ec 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt
@@ -2,11 +2,13 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.data.jsonobjects.repo.LocationFixJson
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside
import net.minecraft.util.AxisAlignedBB
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object LocationFixData {
private var locationFixes = mutableListOf()
@@ -20,9 +22,9 @@ object LocationFixData {
locationFixes.clear()
for (fix in data.locationFixes.values) {
- val island = IslandType.getByName(fix.island_name)
+ val island = IslandType.getByName(fix.islandName)
val area = fix.a.axisAlignedTo(fix.b)
- val realLocation = fix.real_location
+ val realLocation = fix.realLocation
locationFixes.add(LocationFix(island, area, realLocation))
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
index cc9a6aa43931..56e3cdf42e78 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardElement
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
@@ -27,6 +28,7 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.regex.Pattern
+@SkyHanniModule
object MaxwellAPI {
private val storage get() = ProfileStorageData.profileSpecific
@@ -49,72 +51,78 @@ object MaxwellAPI {
storage?.maxwell?.tunings = value ?: return
}
+ var favoritePowers: List
+ get() = storage?.maxwell?.favoritePowers ?: listOf()
+ set(value) {
+ storage?.maxwell?.favoritePowers = value
+ }
+
private var powers = mutableListOf()
private val patternGroup = RepoPattern.group("data.maxwell")
private val chatPowerPattern by patternGroup.pattern(
"chat.power",
- "§eYou selected the §a(?.*) §e(power )?for your §aAccessory Bag§e!"
+ "§eYou selected the §a(?.*) §e(power )?for your §aAccessory Bag§e!",
)
private val chatPowerUnlockedPattern by patternGroup.pattern(
"chat.power.unlocked",
- "§eYour selected power was set to (?:§r)*§a(?.*)(?:§r)*§e!"
+ "§eYour selected power was set to (?:§r)*§a(?.*)(?:§r)*§e!",
)
private val inventoryPowerPattern by patternGroup.pattern(
"inventory.power",
- "§7Selected Power: §a(?.*)"
+ "§7Selected Power: §a(?.*)",
)
private val inventoryMPPattern by patternGroup.pattern(
"inventory.magicalpower",
- "§7Magical Power: §6(?[\\d,]+)"
+ "§7Magical Power: §6(?[\\d,]+)",
)
private val thaumaturgyGuiPattern by patternGroup.pattern(
"gui.thaumaturgy",
- "Accessory Bag Thaumaturgy"
+ "Accessory Bag Thaumaturgy",
)
private val thaumaturgyStartPattern by patternGroup.pattern(
"gui.thaumaturgy.start",
- "§7Your tuning:"
+ "§7Your tuning:",
)
private val thaumaturgyDataPattern by patternGroup.pattern(
"gui.thaumaturgy.data",
- "§(?.)\\+(?[^ ]+)(?.) (?.+)"
+ "§(?.)\\+(?[^ ]+)(?.) (?.+)",
)
private val thaumaturgyMagicalPowerPattern by patternGroup.pattern(
"gui.thaumaturgy.magicalpower",
- "§7Total: §6(?[\\d.,]+) Magical Power"
+ "§7Total: §6(?[\\d.,]+) Magical Power",
)
private val statsTuningGuiPattern by patternGroup.pattern(
"gui.thaumaturgy.statstuning",
- "Stats Tuning"
+ "Stats Tuning",
)
private val statsTuningDataPattern by patternGroup.pattern(
"thaumaturgy.statstuning",
- "§7You have: .+ §7\\+ §(?.)(?[^ ]+) (?.)"
+ "§7You have: .+ §7\\+ §(?.)(?[^ ]+) (?.)",
)
private val tuningAutoAssignedPattern by patternGroup.pattern(
"tuningpoints.chat.autoassigned",
- "§aYour §r§eTuning Points §r§awere auto-assigned as convenience!"
+ "§aYour §r§eTuning Points §r§awere auto-assigned as convenience!",
)
private val yourBagsGuiPattern by patternGroup.pattern(
"gui.yourbags",
- "Your Bags"
+ "Your Bags",
)
private val powerSelectedPattern by patternGroup.pattern(
"gui.selectedpower",
- "§aPower is selected!"
+ "§aPower is selected!",
)
private val noPowerSelectedPattern by patternGroup.pattern(
"gui.noselectedpower",
- "(?:§.)*Visit Maxwell in the Hub to learn"
+ "(?:§.)*Visit Maxwell in the Hub to learn",
)
private val accessoryBagStack by patternGroup.pattern(
"stack.accessorybag",
- "§.Accessory Bag"
+ "§.Accessory Bag",
)
private val redstoneCollectionRequirementPattern by patternGroup.pattern(
"collection.redstone.requirement",
- "(?:§.)*Requires (?:§.)*Redstone Collection I+(?:§.)*\\."
+ "(?:§.)*Requires (?:§.)*Redstone Collection I+(?:§.)*\\.",
)
fun isThaumaturgyInventory(inventoryName: String) = thaumaturgyGuiPattern.matches(inventoryName)
@@ -130,7 +138,9 @@ object MaxwellAPI {
if (tunings.isNullOrEmpty()) return
val tuningsInScoreboard = ScoreboardElement.TUNING in CustomScoreboard.config.scoreboardEntries
if (tuningsInScoreboard) {
- ChatUtils.chat("Talk to Maxwell and open the Tuning Page again to update the tuning data in scoreboard.")
+ ChatUtils.chat(
+ "Talk to Maxwell and open the Tuning Page again to update the tuning data in scoreboard.",
+ )
}
}
}
@@ -142,7 +152,7 @@ object MaxwellAPI {
UnknownMaxwellPower("Unknown power: $power"),
"Unknown power: $power",
"power" to power,
- "message" to message
+ "message" to message,
)
}
}
@@ -178,7 +188,7 @@ object MaxwellAPI {
} ?: ErrorManager.skyHanniError(
"found no name in thaumaturgy",
"stack name" to stack.name,
- "line" to line
+ "line" to line,
)
map.add(it)
}
@@ -210,7 +220,7 @@ object MaxwellAPI {
"Unknown power: $displayName",
"displayName" to displayName,
"lore" to selectedPowerStack.getLore(),
- noStackTrace = true
+ noStackTrace = true,
)
}
@@ -248,7 +258,10 @@ object MaxwellAPI {
var foundMagicalPower = false
for (line in stack.getLore()) {
redstoneCollectionRequirementPattern.matchMatcher(line) {
- ChatUtils.chat("Seems like you don't have the Requirement for the Accessory Bag yet, setting power to No Power and magical power to 0.")
+ ChatUtils.chat(
+ "Seems like you don't have the Requirement for the Accessory Bag yet, " +
+ "setting power to No Power and magical power to 0.",
+ )
currentPower = getPowerByNameOrNull("No Power")
magicalPower = 0
return
@@ -273,7 +286,7 @@ object MaxwellAPI {
"Unknown power: ${stack.displayName}",
"displayName" to stack.displayName,
"lore" to stack.getLore(),
- noStackTrace = true
+ noStackTrace = true,
)
}
}
@@ -282,7 +295,7 @@ object MaxwellAPI {
if (!foundMagicalPower) magicalPower = 0
}
- private fun getPowerByNameOrNull(name: String) = powers.find { it == name }
+ fun getPowerByNameOrNull(name: String) = powers.find { it == name }
private fun isEnabled() = LorenzUtils.inSkyBlock && storage != null
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt
index 584d2291f8a9..0f9ab91574b5 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt
@@ -2,55 +2,102 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigManager
+import at.hannibal2.skyhanni.data.Mayor.Companion.getMayorFromPerk
import at.hannibal2.skyhanni.data.Mayor.Companion.setAssumeMayor
import at.hannibal2.skyhanni.data.Mayor.Companion.setAssumeMayorJson
+import at.hannibal2.skyhanni.data.Perk.Companion.getPerkFromName
import at.hannibal2.skyhanni.data.jsonobjects.other.MayorCandidate
import at.hannibal2.skyhanni.data.jsonobjects.other.MayorElection
import at.hannibal2.skyhanni.data.jsonobjects.other.MayorJson
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.DebugDataCollectEvent
+import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
+import at.hannibal2.skyhanni.features.fame.ReminderUtils
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.APIUtil
+import at.hannibal2.skyhanni.utils.ChatUtils
+import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.CollectionUtils.put
import at.hannibal2.skyhanni.utils.ConditionalUtils.onToggle
+import at.hannibal2.skyhanni.utils.HypixelCommands
+import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark
import at.hannibal2.skyhanni.utils.SkyBlockTime
+import at.hannibal2.skyhanni.utils.SkyBlockTime.Companion.SKYBLOCK_YEAR_MILLIS
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.json.fromJson
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
+import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import kotlin.time.Duration
+import kotlin.time.Duration.Companion.hours
+import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.minutes
+@SkyHanniModule
object MayorAPI {
- val group = RepoPattern.group("mayorapi")
+ private val group = RepoPattern.group("mayorapi")
+
+ // TODO: Add Regex-test
val foxyExtraEventPattern by group.pattern(
"foxy.extraevent",
- "Schedules an extra §.(?.*) §.event during the year\\."
+ "Schedules an extra §.(?.*) §.event during the year\\.",
)
- private val electionOver by group.pattern(
+
+ /**
+ * REGEX-TEST: The election room is now closed. Clerk Seraphine is doing a final count of the votes...
+ */
+ private val electionOverPattern by group.pattern(
"election.over",
- "§eThe election room is now closed\\. Clerk Seraphine is doing a final count of the votes\\.\\.\\."
+ "§eThe election room is now closed\\. Clerk Seraphine is doing a final count of the votes\\.\\.\\.",
+ )
+
+ /**
+ * REGEX-TEST: Calendar and Events
+ */
+ private val calendarGuiPattern by group.pattern(
+ "calendar.gui",
+ "Calendar and Events",
+ )
+
+ /**
+ * REGEX-TEST: §dMayor Jerry
+ */
+ private val jerryHeadPattern by group.pattern(
+ "jerry.head",
+ "§dMayor Jerry",
+ )
+
+ /**
+ * REGEX-TEST: §9Perkpocalypse Perks:
+ */
+ private val perkpocalypsePerksPattern by group.pattern(
+ "perkpocalypse",
+ "§9Perkpocalypse Perks:",
)
+ var currentMayor: Mayor? = null
+ private set
private var lastMayor: Mayor? = null
+ var jerryExtraMayor: Pair = null to SimpleTimeMark.farPast()
+ private set
+ var lastJerryExtraMayorReminder = SimpleTimeMark.farPast()
- var lastUpdate = SimpleTimeMark.farPast()
+ private var lastUpdate = SimpleTimeMark.farPast()
private var dispatcher = Dispatchers.IO
private var rawMayorData: MayorJson? = null
- var candidates = mapOf()
- private set
- var currentMayor: Mayor? = null
- private set
- var timeTillNextMayor = Duration.ZERO
+ private var candidates = mapOf()
+
+ var nextMayorTimestamp = SimpleTimeMark.farPast()
private set
private const val ELECTION_END_MONTH = 3 // Late Spring
@@ -75,23 +122,65 @@ object MayorAPI {
checkHypixelAPI()
getTimeTillNextMayor()
}
+
+ if (!LorenzUtils.inSkyBlock) return
+ if (jerryExtraMayor.first != null && jerryExtraMayor.second.isInPast() && Mayor.JERRY.isActive()) {
+ jerryExtraMayor = null to SimpleTimeMark.farPast()
+ ChatUtils.clickableChat(
+ "The Perkpocalypse Mayor has expired! Click here to update the new temporary Mayor.",
+ onClick = { HypixelCommands.calendar() },
+ )
+ }
+ val misc = SkyHanniMod.feature.misc
+ if (Mayor.JERRY.isActive() && jerryExtraMayor.first == null && misc.unknownPerkpocalypseMayorWarning) {
+ if (lastJerryExtraMayorReminder.passedSince() < 5.minutes) return
+ if (ReminderUtils.isBusy()) return
+ lastJerryExtraMayorReminder = SimpleTimeMark.now()
+ ChatUtils.clickableChat(
+ "The Perkpocalypse Mayor is not known! Click here to update the temporary Mayor.",
+ onClick = { HypixelCommands.calendar() },
+ )
+ }
}
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
- if (!LorenzUtils.onHypixel) return
+ if (!LorenzUtils.inSkyBlock) return
- if (electionOver.matches(event.message)) {
+ if (electionOverPattern.matches(event.message)) {
lastMayor = currentMayor
currentMayor = Mayor.UNKNOWN
}
}
+ @SubscribeEvent
+ fun onInventory(event: InventoryFullyOpenedEvent) {
+ if (!LorenzUtils.inSkyBlock) return
+
+ if (!calendarGuiPattern.matches(event.inventoryName)) return
+
+ val stack: ItemStack =
+ event.inventoryItems.values.firstOrNull { jerryHeadPattern.matches(it.displayName) } ?: return
+
+ val perk = stack.getLore().nextAfter({ perkpocalypsePerksPattern.matches(it) }) ?: return
+ // This is one Perk of the Perkpocalypse Mayor
+ val jerryMayor = getMayorFromPerk(getPerkFromName(perk.removeColor()) ?: return)?.addAllPerks() ?: return
+
+ val lastMayorTimestamp = nextMayorTimestamp - SKYBLOCK_YEAR_MILLIS.milliseconds
+
+ val expireTime = (1..21).map { lastMayorTimestamp + (6.hours * it) }.first { it.isInFuture() }
+
+ ChatUtils.debug("Jerry Mayor found: ${jerryMayor.name} expiring at: ${expireTime.timeUntil()}")
+
+ jerryExtraMayor = jerryMayor to expireTime
+ }
+
private fun calculateNextMayorTime(): SimpleTimeMark {
- var mayorYear = SkyBlockTime.now().year
+ val now = SkyBlockTime.now()
+ var mayorYear = now.year
// Check if either the month is already over or the day after 27th in the third month
- if (SkyBlockTime.now().month > ELECTION_END_MONTH || (SkyBlockTime.now().day >= ELECTION_END_DAY && SkyBlockTime.now().month == ELECTION_END_MONTH)) {
+ if (now.month > ELECTION_END_MONTH || (now.day >= ELECTION_END_DAY && now.month == ELECTION_END_MONTH)) {
// If so, the next mayor will be in the next year
mayorYear++
}
@@ -100,8 +189,7 @@ object MayorAPI {
}
private fun getTimeTillNextMayor() {
- val nextMayorTime = calculateNextMayorTime()
- timeTillNextMayor = nextMayorTime - SimpleTimeMark.now()
+ nextMayorTimestamp = calculateNextMayorTime()
}
private fun checkCurrentMayor() {
@@ -160,7 +248,10 @@ object MayorAPI {
add("Current Mayor: ${currentMayor?.name ?: "Unknown"}")
add("Active Perks: ${currentMayor?.activePerks}")
add("Last Update: $lastUpdate (${lastUpdate.passedSince()} ago)")
- add("Time Till Next Mayor: $timeTillNextMayor")
+ add("Time Till Next Mayor: ${nextMayorTimestamp.timeUntil()}")
+ if (jerryExtraMayor.first != null) {
+ add("Jerry Mayor: ${jerryExtraMayor.first?.name} expiring at: ${jerryExtraMayor.second.timeUntil()}")
+ }
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt b/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt
index 04c1464e0041..ccf74aec259a 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/Mayors.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.data.MayorAPI.currentMayor
import at.hannibal2.skyhanni.data.MayorAPI.foxyExtraEventPattern
import at.hannibal2.skyhanni.data.jsonobjects.other.MayorPerk
import at.hannibal2.skyhanni.test.command.ErrorManager
@@ -39,10 +40,20 @@ enum class Mayor(
override fun toString() = mayorName
+ fun addAllPerks(): Mayor {
+ activePerks.addAll(perks)
+ perks.forEach { it.isActive = true }
+ return this
+ }
+
+ fun isActive() = this == currentMayor
+
companion object {
fun getMayorFromName(name: String): Mayor? = entries.firstOrNull { it.mayorName == name }
+ fun getMayorFromPerk(perk: Perk): Mayor? = entries.firstOrNull { it.perks.contains(perk) }
+
fun setAssumeMayorJson(name: String, perksJson: List): Mayor? {
val mayor = getMayorFromName(name)
if (mayor == null) {
@@ -146,4 +157,8 @@ enum class Perk(val perkName: String) {
;
var isActive = false
+
+ companion object {
+ fun getPerkFromName(name: String): Perk? = entries.firstOrNull { it.perkName == name }
+ }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
index bc0f31e2f274..02768fc3d4bf 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
@@ -1,11 +1,13 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.ItemInHandChangeEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
@@ -19,12 +21,11 @@ import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
+@SkyHanniModule
object MinecraftData {
- @SubscribeEvent(receiveCanceled = true)
- fun onSoundPacket(event: PacketEvent.ReceiveEvent) {
- if (!LorenzUtils.inSkyBlock) return
-
+ @HandleEvent(receiveCancelled = true, onlyOnSkyblock = true)
+ fun onSoundPacket(event: PacketReceivedEvent) {
val packet = event.packet
if (packet !is S29PacketSoundEffect) return
@@ -35,7 +36,7 @@ object MinecraftData {
packet.volume
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
}
}
@@ -44,10 +45,8 @@ object MinecraftData {
LorenzWorldChangeEvent().postAndCatch()
}
- @SubscribeEvent(receiveCanceled = true)
- fun onParticlePacketReceive(event: PacketEvent.ReceiveEvent) {
- if (!LorenzUtils.inSkyBlock) return
-
+ @HandleEvent(receiveCancelled = true, onlyOnSkyblock = true)
+ fun onParticlePacketReceive(event: PacketReceivedEvent) {
val packet = event.packet
if (packet !is S2APacketParticles) return
@@ -61,7 +60,7 @@ object MinecraftData {
packet.particleArgs,
).postAndCatch()
) {
- event.isCanceled = true
+ event.cancel()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
index 0c28874aae23..edb79b89440b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst
@@ -16,6 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.math.absoluteValue
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object MiningAPI {
private val group = RepoPattern.group("data.miningapi")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
index 776580602d95..02f3910196ac 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt
@@ -1,17 +1,20 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.InventoryUpdatedEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraft.item.ItemStack
import net.minecraft.network.play.server.S2DPacketOpenWindow
import net.minecraft.network.play.server.S2EPacketCloseWindow
import net.minecraft.network.play.server.S2FPacketSetSlot
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object OtherInventoryData {
private var currentInventory: Inventory? = null
@@ -36,8 +39,8 @@ object OtherInventoryData {
}
}
- @SubscribeEvent
- fun onInventoryDataReceiveEvent(event: PacketEvent.ReceiveEvent) {
+ @HandleEvent
+ fun onInventoryDataReceiveEvent(event: PacketReceivedEvent) {
val packet = event.packet
if (packet is S2EPacketCloseWindow) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt
index 2759f82b9d0c..6a855a06bcf6 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt
@@ -1,13 +1,16 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent
-import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.InventoryUtils
@@ -22,13 +25,13 @@ import net.minecraft.client.Minecraft
import net.minecraft.network.play.client.C0EPacketClickWindow
import net.minecraft.network.play.server.S0DPacketCollectItem
import net.minecraft.network.play.server.S2FPacketSetSlot
-import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
-class OwnInventoryData {
+@SkyHanniModule
+object OwnInventoryData {
private var itemAmounts = mapOf()
private var dirty = false
@@ -37,10 +40,8 @@ class OwnInventoryData {
"§aMoved §r§e\\d* (?.*)§r§a from your Sacks to your inventory."
)
- @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
- fun onItemPickupReceivePacket(event: PacketEvent.ReceiveEvent) {
- if (!LorenzUtils.inSkyBlock) return
-
+ @HandleEvent(priority = HandleEvent.LOW, receiveCancelled = true, onlyOnSkyblock = true)
+ fun onItemPickupReceivePacket(event: PacketReceivedEvent) {
val packet = event.packet
if (packet is S2FPacketSetSlot || packet is S0DPacketCollectItem) {
dirty = true
@@ -57,9 +58,8 @@ class OwnInventoryData {
}
}
- @SubscribeEvent
- fun onClickEntity(event: PacketEvent.SendEvent) {
- if (!LorenzUtils.inSkyBlock) return
+ @HandleEvent(onlyOnSkyblock = true)
+ fun onClickEntity(event: PacketSentEvent) {
val packet = event.packet
if (packet is C0EPacketClickWindow) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
index 5afdea70f9aa..ee2257545c8f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.data.hypixel.chat.event.PartyChatEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.OSUtils
@@ -14,6 +15,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.random.Random
+@SkyHanniModule
object PartyAPI {
private val patternGroup = RepoPattern.group("data.party")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt
index 7339f9a2a1bb..5b65c8e23cca 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PetAPI.kt
@@ -1,9 +1,11 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
+@SkyHanniModule
object PetAPI {
private val patternGroup = RepoPattern.group("misc.pet")
private val petMenuPattern by patternGroup.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
index 21f3d5b8c3ca..6db5913a7bb5 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt
@@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.HypixelJoinEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.DelayedRun
@@ -22,6 +23,7 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object ProfileStorageData {
var playerSpecific: PlayerSpecificStorage? = null
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
index e09eb11d787e..5c7f94aed3ea 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.PurseChangeCause
import at.hannibal2.skyhanni.events.PurseChangeEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble
import at.hannibal2.skyhanni.utils.NumberUtil.million
import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst
@@ -13,6 +14,7 @@ import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object PurseAPI {
private val patternGroup = RepoPattern.group("data.purse")
val coinsPattern by patternGroup.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
index 51f9fb6be5b5..51240ecd3243 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
@@ -3,10 +3,11 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.data.jsonobjects.repo.ArrowTypeJson
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
-import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent
import at.hannibal2.skyhanni.events.QuiverUpdateEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.events.SecondPassedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemCategory
@@ -28,8 +29,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.item.ItemBow
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-private var infinityQuiverLevelMultiplier = 0.03f
+@SkyHanniModule
object QuiverAPI {
private val storage get() = ProfileStorageData.profileSpecific
var currentArrow: ArrowType?
@@ -273,7 +274,7 @@ object QuiverAPI {
}
@SubscribeEvent
- fun onTick(event: LorenzTickEvent) {
+ fun onSecondPassed(event: SecondPassedEvent) {
if (!isEnabled()) return
if (event.repeatSeconds(2)) {
checkChestplate()
diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt
index f8e8f37dae27..0aae783575b8 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.features.chroma.ChromaConfig
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.features.misc.visualwords.VisualWordGui
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.utils.ConfigUtils
import net.minecraft.client.Minecraft
@@ -16,7 +17,8 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.client.event.RenderWorldLastEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RenderData {
+@SkyHanniModule
+object RenderData {
@SubscribeEvent
fun onRenderOverlay(event: RenderGameOverlayEvent.Pre) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
index b4c203291adb..a2235608ec0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.events.SackDataUpdateEvent
import at.hannibal2.skyhanni.features.fishing.FishingAPI
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity
import at.hannibal2.skyhanni.features.inventory.SackDisplay
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
@@ -36,6 +37,7 @@ import com.google.gson.annotations.Expose
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object SackAPI {
private val sackDisplayConfig get() = SkyHanniMod.feature.inventory.sackDisplay
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
index 7330317f297b..72abf6bab54f 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
@@ -1,9 +1,11 @@
package at.hannibal2.skyhanni.data
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
import at.hannibal2.skyhanni.events.ScoreboardRawChangeEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.RegexUtils.matches
import net.minecraft.client.Minecraft
import net.minecraft.network.play.server.S3CPacketUpdateScore
@@ -13,66 +15,45 @@ import net.minecraft.scoreboard.ScorePlayerTeam
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class ScoreboardData {
-
- companion object {
-
- private val minecraftColorCodesPattern = "(?i)[0-9a-fkmolnr]".toPattern()
-
- // TODO USE SH-REPO
- private val splitIcons = listOf(
- "\uD83C\uDF6B",
- "\uD83D\uDCA3",
- "\uD83D\uDC7D",
- "\uD83D\uDD2E",
- "\uD83D\uDC0D",
- "\uD83D\uDC7E",
- "\uD83C\uDF20",
- "\uD83C\uDF6D",
- "⚽",
- "\uD83C\uDFC0",
- "\uD83D\uDC79",
- "\uD83C\uDF81",
- "\uD83C\uDF89",
- "\uD83C\uDF82",
- "\uD83D\uDD2B",
- )
-
- fun formatLines(rawList: List): List {
- val list = mutableListOf()
- for (line in rawList) {
- val separator = splitIcons.find { line.contains(it) } ?: continue
- val split = line.split(separator)
- val start = split[0]
- var end = split[1]
- // get last color code in start
- val lastColorIndex = start.lastIndexOf('§')
- val lastColor = if (lastColorIndex != -1
- && lastColorIndex + 1 < start.length
- && (minecraftColorCodesPattern.matches(start[lastColorIndex + 1].toString()))
- ) start.substring(lastColorIndex, lastColorIndex + 2)
- else ""
-
- // remove first color code from end, when it is the same as the last color code in start
- end = end.removePrefix(lastColor)
-
- list.add(start + end)
- }
+@SkyHanniModule
+object ScoreboardData {
- return list
- }
+ var sidebarLinesFormatted: List = emptyList()
- var sidebarLinesFormatted: List = emptyList()
+ private var sidebarLines: List = emptyList() // TODO rename to raw
+ var sidebarLinesRaw: List = emptyList() // TODO delete
+ var objectiveTitle = ""
- var sidebarLines: List = emptyList() // TODO rename to raw
- var sidebarLinesRaw: List = emptyList() // TODO delete
- var objectiveTitle = ""
- }
+ private var dirty = false
+
+ private val minecraftColorCodesPattern = "(?i)[0-9a-fkmolnr]".toPattern()
+
+ fun formatLines(rawList: List): List {
+ val list = mutableListOf()
+ for (line in rawList) {
+ val separator = splitIcons.find { line.contains(it) } ?: continue
+ val split = line.split(separator)
+ val start = split[0]
+ var end = split[1]
+ // get last color code in start
+ val lastColorIndex = start.lastIndexOf('§')
+ val lastColor = if (lastColorIndex != -1
+ && lastColorIndex + 1 < start.length
+ && (minecraftColorCodesPattern.matches(start[lastColorIndex + 1].toString()))
+ ) start.substring(lastColorIndex, lastColorIndex + 2)
+ else ""
- var dirty = false
+ // remove first color code from end, when it is the same as the last color code in start
+ end = end.removePrefix(lastColor)
- @SubscribeEvent(receiveCanceled = true)
- fun onPacketReceive(event: PacketEvent.ReceiveEvent) {
+ list.add(start + end)
+ }
+
+ return list
+ }
+
+ @HandleEvent(receiveCancelled = true)
+ fun onPacketReceive(event: PacketReceivedEvent) {
if (event.packet is S3CPacketUpdateScore) {
if (event.packet.objectiveName == "update") {
dirty = true
@@ -126,4 +107,23 @@ class ScoreboardData {
ScorePlayerTeam.formatPlayerName(scoreboard.getPlayersTeam(it.playerName), it.playerName)
}
}
+
+ // TODO USE SH-REPO
+ private val splitIcons = listOf(
+ "\uD83C\uDF6B",
+ "\uD83D\uDCA3",
+ "\uD83D\uDC7D",
+ "\uD83D\uDD2E",
+ "\uD83D\uDC0D",
+ "\uD83D\uDC7E",
+ "\uD83C\uDF20",
+ "\uD83C\uDF6D",
+ "⚽",
+ "\uD83C\uDFC0",
+ "\uD83D\uDC79",
+ "\uD83C\uDF81",
+ "\uD83C\uDF89",
+ "\uD83C\uDF82",
+ "\uD83D\uDD2B",
+ )
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt
index 194983695f6f..2b64ed1ab33d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt
@@ -2,9 +2,11 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object ScreenData {
private var wasOpen = false
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
index 3d3be9c3a3e4..93870b119b82 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.SlayerChangeEvent
import at.hannibal2.skyhanni.events.SlayerProgressChangeEvent
import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent
import at.hannibal2.skyhanni.features.slayer.SlayerType
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.ItemUtils.itemName
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -21,6 +22,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
+@SkyHanniModule
object SlayerAPI {
private var nameCache = TimeLimitedCache, Pair>(1.minutes)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
index fe776c8d0631..f8ad4f652fc3 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt
@@ -1,21 +1,23 @@
package at.hannibal2.skyhanni.data
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.events.TitleReceivedEvent
+import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import net.minecraft.network.play.server.S45PacketTitle
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class TitleData {
+@SkyHanniModule
+object TitleData {
- @SubscribeEvent
- fun onReceiveCurrentShield(event: PacketEvent.ReceiveEvent) {
+ @HandleEvent
+ fun onReceiveCurrentShield(event: PacketReceivedEvent) {
val packet = event.packet
if (packet !is S45PacketTitle) return
val message = packet.message ?: return
val formattedText = message.formattedText
if (TitleReceivedEvent(formattedText).postAndCatch()) {
- event.isCanceled = true
+ event.cancel()
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt
index af3683402391..95dbe1577f56 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import io.github.notenoughupdates.moulconfig.internal.TextRenderUtils
@@ -14,43 +15,41 @@ import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
-class TitleManager {
+@SkyHanniModule
+object TitleManager {
- companion object {
+ private var originalText = ""
+ private var display = ""
+ private var endTime = SimpleTimeMark.farPast()
+ private var heightModifier = 1.8
+ private var fontSizeModifier = 4f
- private var originalText = ""
- private var display = ""
- private var endTime = SimpleTimeMark.farPast()
- private var heightModifier = 1.8
- private var fontSizeModifier = 4f
+ fun sendTitle(text: String, duration: Duration, height: Double, fontSize: Float) {
+ originalText = text
+ display = "§f$text"
+ endTime = SimpleTimeMark.now() + duration
+ heightModifier = height
+ fontSizeModifier = fontSize
+ }
- fun sendTitle(text: String, duration: Duration, height: Double, fontSize: Float) {
- originalText = text
- display = "§f$text"
- endTime = SimpleTimeMark.now() + duration
- heightModifier = height
- fontSizeModifier = fontSize
+ fun optionalResetTitle(condition: (String) -> Boolean) {
+ if (condition(originalText)) {
+ sendTitle("", 1.milliseconds, 1.8, 4f)
}
+ }
- fun optionalResetTitle(condition: (String) -> Boolean) {
- if (condition(originalText)) {
- sendTitle("", 1.milliseconds, 1.8, 4f)
- }
+ fun command(args: Array) {
+ if (args.size < 4) {
+ ChatUtils.userError("Usage: /shsendtitle ")
+ return
}
- fun command(args: Array) {
- if (args.size < 4) {
- ChatUtils.userError("Usage: /shsendtitle ")
- return
- }
+ val duration = args[0].toInt().seconds
+ val height = args[1].toDouble()
+ val fontSize = args[2].toFloat()
+ val title = "§6" + args.drop(3).joinToString(" ").replace("&", "§")
- val duration = args[0].toInt().seconds
- val height = args[1].toDouble()
- val fontSize = args[2].toFloat()
- val title = "§6" + args.drop(3).joinToString(" ").replace("&", "§")
-
- sendTitle(title, duration, height, fontSize)
- }
+ sendTitle(title, duration, height, fontSize)
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt
index 70cd9cd343bc..482b590fe54b 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt
@@ -37,7 +37,7 @@ object ToolTipData {
@JvmStatic
fun onHover(stack: ItemStack, toolTip: MutableList) {
- ItemHoverEvent(stack, toolTip).postAndCatch()
+ ItemHoverEvent(stack, toolTip).post()
}
var lastSlot: Slot? = null
diff --git a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt
index b59d31394920..ab5f9cc78c69 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt
@@ -5,11 +5,13 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.config.features.misc.TrackerConfig.PriceFromEntry
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ConditionalUtils
import at.hannibal2.skyhanni.utils.ConfigUtils
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+@SkyHanniModule
object TrackerManager {
private var hasChanged = false
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 6ed9b8e6a8d1..dfbb0816418e 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarData
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.APIUtil
import at.hannibal2.skyhanni.utils.ChatUtils
@@ -22,6 +23,7 @@ import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
// https://api.hypixel.net/#tag/SkyBlock/paths/~1v2~1skyblock~1bazaar/get
+@SkyHanniModule
object HypixelBazaarFetcher {
private const val URL = "https://api.hypixel.net/v2/skyblock/bazaar"
private const val HIDDEN_FAILED_ATTEMPTS = 3
@@ -61,7 +63,7 @@ object HypixelBazaarFetcher {
private fun process(products: Map) = products.mapNotNull { (key, product) ->
val internalName = NEUItems.transHypixelNameToInternalName(key)
val sellOfferPrice = product.buySummary.minOfOrNull { it.pricePerUnit } ?: 0.0
- val insantBuyPrice = product.sellSummary.maxOfOrNull { it.pricePerUnit } ?: 0.0
+ val instantBuyPrice = product.sellSummary.maxOfOrNull { it.pricePerUnit } ?: 0.0
if (product.quickStatus.isEmpty()) {
return@mapNotNull null
@@ -70,11 +72,10 @@ object HypixelBazaarFetcher {
if (internalName.getItemStackOrNull() == null) {
// Items that exist in Hypixel's Bazaar API, but not in NEU repo (not visible in the ingame bazaar).
// Should only include Enchants
- if (LorenzUtils.debug)
- println("Unknown bazaar product: $key/$internalName")
+ if (LorenzUtils.debug) println("Unknown bazaar product: $key/$internalName")
return@mapNotNull null
}
- internalName to BazaarData(internalName.itemName, sellOfferPrice, insantBuyPrice, product)
+ internalName to BazaarData(internalName.itemName, sellOfferPrice, instantBuyPrice, product)
}.toMap()
private fun BazaarQuickStatus.isEmpty(): Boolean = with(this) {
@@ -102,7 +103,7 @@ object HypixelBazaarFetcher {
userMessage,
"fetchType" to fetchType,
"failedAttepmts" to failedAttempts,
- "rawResponse" to rawResponse
+ "rawResponse" to rawResponse,
)
}
}
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 023589e0f090..f8f8b4523541 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
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.data.hypixel.chat.event.PlayerShowItemChatEvent
import at.hannibal2.skyhanni.data.hypixel.chat.event.PrivateMessageChatEvent
import at.hannibal2.skyhanni.data.hypixel.chat.event.SystemMessageEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ComponentMatcher
import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.intoSpan
import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.matchStyledMatcher
@@ -23,7 +24,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
/**
* Reading normal chat events, and splitting them up into many different player chat events, with all available extra information
*/
-class PlayerChatManager {
+@SkyHanniModule
+object PlayerChatManager {
private val patternGroup = RepoPattern.group("data.chat.player")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt
index b617fd1185d6..94bc665b6202 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.features.bingo.BingoAPI
import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
import at.hannibal2.skyhanni.features.misc.compacttablist.AdvancedPlayerList
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils.changeColor
import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.matchStyledMatcher
import at.hannibal2.skyhanni.utils.ComponentSpan
@@ -34,7 +35,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
* Listening to the player chat events, and applying custom chat options to them.
* E.g. part order, rank hider, etc
*/
-class PlayerNameFormatter {
+@SkyHanniModule
+object PlayerNameFormatter {
private val config get() = SkyHanniMod.feature.chat.playerMessage
private val patternGroup = RepoPattern.group("data.chat.player.name")
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/local/HotmTree.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/local/HotmTree.kt
index 3c0118089203..b1635144a696 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/local/HotmTree.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/local/HotmTree.kt
@@ -1,4 +1,4 @@
-package at.hannibal2.skyhanni.data.jsonobjects.local;
+package at.hannibal2.skyhanni.data.jsonobjects.local
import at.hannibal2.skyhanni.utils.json.fromJson
import com.google.gson.Gson
@@ -7,11 +7,11 @@ import com.google.gson.annotations.Expose
class HotmTree {
@Expose
- val perks = mutableMapOf();
+ val perks = mutableMapOf()
fun deepCopy(): HotmTree {
- val gson = Gson();
- val json = gson.toJson(this);
+ val gson = Gson()
+ val json = gson.toJson(this)
return gson.fromJson(json)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt
index 2f2543f5626b..5da9a9629fe7 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt
@@ -7,7 +7,7 @@ import com.google.gson.annotations.SerializedName
data class ElitePlayerWeightJson(
@Expose val selectedProfileId: String,
- @Expose val profiles: List
+ @Expose val profiles: List,
)
data class WeightProfile(
@@ -17,30 +17,30 @@ data class WeightProfile(
@Expose val cropWeight: Map,
@Expose val bonusWeight: Map,
@Expose val uncountedCrops: Map,
- @Expose val pests: Map
+ @Expose val pests: Map,
)
data class EliteLeaderboardJson(
- @Expose val data: EliteLeaderboard
+ @Expose val data: EliteLeaderboard,
)
data class EliteLeaderboard(
@Expose val rank: Int,
@Expose val upcomingRank: Int,
- @Expose val upcomingPlayers: List
+ @Expose val upcomingPlayers: List,
)
data class UpcomingLeaderboardPlayer(
@Expose @SerializedName("ign") val name: String,
- @Expose @SerializedName("amount") val weight: Double
+ @Expose @SerializedName("amount") val weight: Double,
)
data class EliteWeightsJson(
@Expose val crops: Map,
- @Expose val pests: PestWeightData
+ @Expose val pests: PestWeightData,
)
data class PestWeightData(
@Expose val brackets: Map,
- @Expose @SerializedName("values") val pestWeights: Map>
+ @Expose @SerializedName("values") val pestWeights: Map>,
)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/HypixelPlayerApiJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/HypixelPlayerApiJson.kt
index 47304433ab43..70a3529104eb 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/HypixelPlayerApiJson.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/HypixelPlayerApiJson.kt
@@ -2,36 +2,34 @@ package at.hannibal2.skyhanni.data.jsonobjects.other
import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
-import javax.annotation.Nullable
data class HypixelPlayerApiJson(
- @Expose val profiles: List
+ @Expose val profiles: List,
)
data class HypixelApiProfile(
@Expose val members: Map,
- @Expose @SerializedName("cute_name") val profileName: String
+ @Expose @SerializedName("cute_name") val profileName: String,
)
data class HypixelApiPlayer(
@Expose @SerializedName("trophy_fish") val trophyFish: HypixelApiTrophyFish,
- @Expose val events: HypixelApiEvents
+ @Expose val events: HypixelApiEvents,
)
data class HypixelApiEvents(
- @Expose val easter: HypixelApiEasterEvent
+ @Expose val easter: HypixelApiEasterEvent,
)
data class HypixelApiEasterEvent(
- @Expose val rabbits: HypixelApiRabbits
+ @Expose val rabbits: HypixelApiRabbits,
)
data class HypixelApiRabbits(
- @Expose @SerializedName("collected_locations")
- val collectedLocations: Map>
+ @Expose @SerializedName("collected_locations") val collectedLocations: Map>,
)
data class HypixelApiTrophyFish(
val totalCaught: Int,
- val caught: Map
+ val caught: Map,
)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/SkyblockItemsDataJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/SkyblockItemsDataJson.kt
index 0676a5e8eed9..65384848fbe1 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/SkyblockItemsDataJson.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/SkyblockItemsDataJson.kt
@@ -4,11 +4,11 @@ import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
data class SkyblockItemsDataJson(
- @Expose val items: List
+ @Expose val items: List,
)
data class SkyblockItemData(
@Expose val id: String?,
@Expose @SerializedName("npc_sell_price") val npcPrice: Double?,
- @Expose @SerializedName("motes_sell_price") val motesPrice: Double?
+ @Expose @SerializedName("motes_sell_price") val motesPrice: Double?,
)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.java
deleted file mode 100644
index a1122eec348a..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.Map;
-
-public class AnitaUpgradeCostsJson {
- @Expose
- public Map level_price;
-
- public static class Price {
- @Expose
- public Integer gold_medals;
-
- @Expose
- public Integer jacob_tickets;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.kt
new file mode 100644
index 000000000000..f4ced7e83b95
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/AnitaUpgradeCostsJson.kt
@@ -0,0 +1,13 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
+
+data class AnitaUpgradeCostsJson(
+ @Expose @SerializedName("level_price") val levelPrice: Map,
+)
+
+data class AnitaUpgradePrice(
+ @Expose @SerializedName("gold_medals") val goldMedals: Int,
+ @Expose @SerializedName("jacob_tickets") val jacobTickets: Int,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.java
deleted file mode 100644
index c8038c49fc34..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.List;
-import java.util.Map;
-
-public class ArmorDropsJson {
- @Expose
- public Map special_crops;
-
- public static class DropInfo {
- @Expose
- public String armor_type;
-
- @Expose
- public List chance;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.kt
new file mode 100644
index 000000000000..4441a37d5b78
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArmorDropsJson.kt
@@ -0,0 +1,13 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
+
+data class ArmorDropsJson(
+ @Expose @SerializedName("special_crops") val specialCrops: Map,
+)
+
+data class ArmorDropInfo(
+ @Expose @SerializedName("armor_type") val armorType: String,
+ @Expose val chance: List,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java
deleted file mode 100644
index 4173fa0a3425..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.Map;
-
-public class ArrowTypeJson {
- @Expose
- public Map arrows;
-
- public static class ArrowAttributes {
- @Expose
- public String arrow;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.kt
new file mode 100644
index 000000000000..1d8d6e1cfb58
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.kt
@@ -0,0 +1,11 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+
+data class ArrowTypeJson(
+ @Expose val arrows: Map,
+)
+
+data class ArrowAttributes(
+ @Expose val arrow: String,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.java
deleted file mode 100644
index 15aadc2d47bc..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.Map;
-
-public class BeltsJson {
- @Expose
- public Map belts;
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.kt
new file mode 100644
index 000000000000..2cc4d4fe39a7
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BeltsJson.kt
@@ -0,0 +1,7 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+
+data class BeltsJson(
+ @Expose val belts: Map,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.java
deleted file mode 100644
index f9e8406ebbcb..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.List;
-import java.util.Map;
-
-public class BingoJson {
- @Expose
- public Map bingo_tips;
-
- public static class BingoData {
- @Expose
- public String difficulty;
-
- @Expose
- public List note;
-
- @Expose
- public List guide;
-
- @Expose
- public String found;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.kt
new file mode 100644
index 000000000000..4078d917e8c1
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoJson.kt
@@ -0,0 +1,15 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
+
+data class BingoJson(
+ @Expose @SerializedName("bingo_tips") val bingoTips: Map,
+)
+
+data class BingoData(
+ @Expose val difficulty: String,
+ @Expose val note: List,
+ @Expose val guide: List,
+ @Expose val found: String,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.java
deleted file mode 100644
index 98f2a469547f..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.Map;
-
-public class BingoRanksJson {
- @Expose
- public Map ranks;
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.kt
new file mode 100644
index 000000000000..598e94ee845e
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/BingoRanksJson.kt
@@ -0,0 +1,7 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+
+data class BingoRanksJson(
+ @Expose val ranks: Map,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.java
deleted file mode 100644
index 0ab0e52ff617..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import at.hannibal2.skyhanni.utils.NEUInternalName;
-import com.google.gson.annotations.Expose;
-
-import java.util.List;
-import java.util.Map;
-
-public class CrimsonIsleReputationJson {
- @Expose
- public Map FISHING;
-
- @Expose
- public Map RESCUE;
-
- @Expose
- public Map FETCH;
-
- @Expose
- public Map DOJO;
-
- @Expose
- public Map MINIBOSS;
-
- @Expose
- public Map KUUDRA;
-
- public static class ReputationQuest {
- @Expose
- public NEUInternalName item;
-
- @Expose
- public List location;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.kt
new file mode 100644
index 000000000000..c669a8eb3cc3
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/CrimsonIsleReputationJson.kt
@@ -0,0 +1,18 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import at.hannibal2.skyhanni.utils.NEUInternalName
+import com.google.gson.annotations.Expose
+
+data class CrimsonIsleReputationJson(
+ @Expose val FISHING: Map,
+ @Expose val RESCUE: Map,
+ @Expose val FETCH: Map,
+ @Expose val DOJO: Map,
+ @Expose val MINIBOSS: Map,
+ @Expose val KUUDRA: Map,
+)
+
+data class ReputationQuest(
+ @Expose val item: NEUInternalName,
+ @Expose val location: List,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.java
deleted file mode 100644
index e7c167e5349b..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-
-import java.util.List;
-
-public class DanceRoomInstructionsJson {
- @Expose
- public List instructions;
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.kt
new file mode 100644
index 000000000000..991f0a15f6be
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DanceRoomInstructionsJson.kt
@@ -0,0 +1,7 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+
+data class DanceRoomInstructionsJson(
+ @Expose val instructions: List,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDrops.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDrops.java
deleted file mode 100644
index 050601c3d642..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDrops.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import at.hannibal2.skyhanni.utils.NEUInternalName;
-import com.google.gson.annotations.Expose;
-
-import java.util.List;
-
-public class DianaDrops {
- @Expose
- public List diana_drops;
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDropsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDropsJson.kt
new file mode 100644
index 000000000000..5bbdfde1d3fb
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DianaDropsJson.kt
@@ -0,0 +1,9 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import at.hannibal2.skyhanni.utils.NEUInternalName
+import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
+
+data class DianaDropsJson(
+ @Expose @SerializedName("diana_drops") val dianaDrops: List,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.java
deleted file mode 100644
index 00a662768473..000000000000
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package at.hannibal2.skyhanni.data.jsonobjects.repo;
-
-import com.google.gson.annotations.Expose;
-import com.google.gson.annotations.SerializedName;
-
-import java.util.List;
-
-public class DicerDropsJson {
- @Expose
- public DicerType MELON;
-
- @Expose
- public DicerType PUMPKIN;
-
- public static class DicerType {
- @Expose
- @SerializedName("total chance")
- public Integer totalChance;
-
- @Expose
- public List drops;
- }
-
- public static class DropInfo {
- @Expose
- public Integer chance;
-
- @Expose
- public List amount;
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.kt
new file mode 100644
index 000000000000..ef36a932335d
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DicerDropsJson.kt
@@ -0,0 +1,19 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
+
+class DicerDropsJson(
+ @Expose val MELON: DicerType,
+ @Expose val PUMPKIN: DicerType,
+)
+
+data class DicerType(
+ @Expose @SerializedName("total chance") val totalChance: Int,
+ @Expose val drops: List,
+)
+
+data class DropInfo(
+ @Expose val chance: Int,
+ @Expose val amount: List,
+)
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DisabledEventsJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DisabledEventsJson.kt
new file mode 100644
index 000000000000..131ea5f3cdd8
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/DisabledEventsJson.kt
@@ -0,0 +1,8 @@
+package at.hannibal2.skyhanni.data.jsonobjects.repo
+
+import com.google.gson.annotations.Expose
+
+data class DisabledEventsJson(
+ @Expose val disabledHandlers: Set = emptySet(),
+ @Expose val disabledInvokers: Set