aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/skyblock/ScreenIdentification.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util/skyblock/ScreenIdentification.kt')
-rw-r--r--src/main/kotlin/util/skyblock/ScreenIdentification.kt37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/kotlin/util/skyblock/ScreenIdentification.kt b/src/main/kotlin/util/skyblock/ScreenIdentification.kt
new file mode 100644
index 0000000..4fea3df
--- /dev/null
+++ b/src/main/kotlin/util/skyblock/ScreenIdentification.kt
@@ -0,0 +1,37 @@
+package moe.nea.firmament.util.skyblock
+
+import net.minecraft.client.gui.screen.Screen
+import net.minecraft.client.gui.screen.ingame.GenericContainerScreen
+import moe.nea.firmament.util.mc.displayNameAccordingToNbt
+import moe.nea.firmament.util.mc.loreAccordingToNbt
+import moe.nea.firmament.util.unformattedString
+
+
+fun Screen.isBazaarUi(): Boolean {
+ if (this !is GenericContainerScreen) return false
+ return (
+ this.screenHandler.stacks[this.screenHandler.rows * 9 - 4]
+ .displayNameAccordingToNbt
+ .unformattedString == "Manage Orders"
+ || this.screenHandler.stacks[this.screenHandler.rows * 9 - 5]
+ .loreAccordingToNbt
+ .any {
+ it.unformattedString == "To Bazaar"
+ })
+}
+
+fun Screen.isEnchantmentGuide(): Boolean {
+ return title.unformattedString.endsWith("Enchantments Guide")
+}
+
+fun Screen.isSuperPairs(): Boolean {
+ return title.unformattedString.startsWith("Superpairs")
+}
+
+fun Screen.isExperimentationRngMeter(): Boolean {
+ return this.title.unformattedString.contains("Experimentation Table RNG")
+}
+
+fun Screen.isDyeCompendium(): Boolean {
+ return this.title.unformattedString.contains("Dye Compendium")
+}