diff options
Diffstat (limited to 'src')
3 files changed, 31 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/FossilExcavatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/FossilExcavatorConfig.java index 176c8f3bd..8dfb12854 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/FossilExcavatorConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/FossilExcavatorConfig.java @@ -36,4 +36,12 @@ public class FossilExcavatorConfig { @FeatureToggle public boolean glacitePowderStack = false; + @Expose + @ConfigOption( + name = "Hide Excavator Tooltips", + desc = "Hides tooltips of items inside of the Fossil Excavator." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean hideExcavatorTooltips = true; } 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 75b1d6ad3..a79a66717 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -213,6 +213,6 @@ object HarpFeatures { if (!config.hideMelodyTooltip) return if (!isHarpGui(InventoryUtils.openInventoryName())) return if (event.slot.inventory !is ContainerLocalMenu) return - event.cancel() + event.cancel() } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt new file mode 100644 index 000000000..8b58402cd --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt @@ -0,0 +1,22 @@ +package at.hannibal2.skyhanni.features.mining.fossilexcavator + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import net.minecraft.client.player.inventory.ContainerLocalMenu +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +@SkyHanniModule +object ExcavatorTooltipHider { + + private val config get() = SkyHanniMod.feature.mining.fossilExcavator + + @SubscribeEvent + fun onTooltip(event: LorenzToolTipEvent) { + if (!isEnabled()) return + if (event.slot.inventory !is ContainerLocalMenu) return + event.cancel() + } + + fun isEnabled() = FossilExcavatorAPI.inInventory && !FossilExcavatorAPI.inExcavatorMenu && config.hideExcavatorTooltips +} |