aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorraaaaaven <168305416+raaaaaven@users.noreply.github.com>2024-05-06 16:03:31 +0100
committerGitHub <noreply@github.com>2024-05-06 17:03:31 +0200
commit1a4b36a327841a9ed9d3f0006e00908d5bce643a (patch)
treeda1ab47b5c1a9bb28ae4bd9b38a89c5d369a779f /src/main/java/at/hannibal2/skyhanni
parent03889ebae017fb39e858dd0df04655e275fca62d (diff)
downloadskyhanni-1a4b36a327841a9ed9d3f0006e00908d5bce643a.tar.gz
skyhanni-1a4b36a327841a9ed9d3f0006e00908d5bce643a.tar.bz2
skyhanni-1a4b36a327841a9ed9d3f0006e00908d5bce643a.zip
Feature: Hide tooltips while in the Harp. (#1700)
Co-authored-by: raven <raveeeennnn@hotmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt11
2 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java
index a8a38af68..0960c46b5 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/helper/HelperConfig.java
@@ -36,6 +36,12 @@ public class HelperConfig {
public boolean showNumbers = false;
@Expose
+ @ConfigOption(name = "Hide Tooltip", desc = "Hides the item tooltips inside the Harp.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean hideMelodyTooltip = false;
+
+ @Expose
@ConfigOption(name = "Keybinds", desc = "")
@Accordion
public HarpConfigKeyBinds harpKeybinds = new HarpConfigKeyBinds();
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
index 71ce9c41e..70fd79ab9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.GuiKeyPressEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
+import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.utils.DelayedRun
import at.hannibal2.skyhanni.utils.InventoryUtils
@@ -20,6 +21,7 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.ScaledResolution
import net.minecraft.client.gui.inventory.GuiChest
+import net.minecraft.client.player.inventory.ContainerLocalMenu
import net.minecraft.item.Item
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.network.FMLNetworkEvent
@@ -201,4 +203,13 @@ object HarpFeatures {
event.move(2, "misc.harpKeybinds", "inventory.helper.harp.keybinds")
event.move(2, "misc.harpNumbers", "inventory.helper.harp.showNumbers")
}
+
+ @SubscribeEvent
+ fun onTooltip(event: LorenzToolTipEvent) {
+ if (!LorenzUtils.inSkyBlock) return
+ if (!config.hideMelodyTooltip) return
+ if (!isHarpGui(InventoryUtils.openInventoryName())) return
+ if (event.slot.inventory !is ContainerLocalMenu) return
+ event.cancel()
+ }
}