aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-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()
+ }
}