Skip to content

Commit

Permalink
[CHERRYPICK MINING] IMPLEMENT ABSTRACT
Browse files Browse the repository at this point in the history
Signed-off-by: Erymanthus[#5074] | (u/)RayDeeUx <[email protected]>
  • Loading branch information
RayDeeUx committed Dec 8, 2023
1 parent 8289cd0 commit 27c19a3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package at.hannibal2.skyhanni.features.inventory.itemdisplayoverlay.menu

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.features.inventory.stacksize.StackSizeMenuConfig
import at.hannibal2.skyhanni.events.RenderItemTipEvent
import at.hannibal2.skyhanni.features.inventory.itemdisplayoverlay.AbstractMenuStackSize
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
Expand All @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

class MenuItemDisplayOverlayMining {
class MenuItemDisplayOverlayMining : AbstractMenuStackSize() {
// private val genericPercentPattern = ".* (§.)?(?<percent>[0-9]+)(\\.[0-9]*)?(§.)?%".toPattern()
private val hotmPerkLevelXOutOfYLoreLinePattern = "(§.).* (?<useful>[0-9]+)(§.)?(\\/(§.)?(?<total>[0-9]+))?.*".toPattern()
private val rightClickToEnableDisableLoreLinePattern = (("(§.)*Right.?click to (§.)*disable(§.)*!").toPattern())
Expand All @@ -35,9 +35,9 @@ class MenuItemDisplayOverlayMining {
event.stackTip = getStackTip(event.stack)
}

private fun getStackTip(item: ItemStack): String {
if (SkyHanniMod.feature.inventory.stackSize.menu.mining.isEmpty()) return ""
val stackSizeConfig = SkyHanniMod.feature.inventory.stackSize.menu.mining
override fun getStackTip(item: ItemStack): String {
if (configMenuStackSize.mining.isEmpty()) return ""
val stackSizeConfig = configMenuStackSize.mining
val chestName = InventoryUtils.openInventoryName()

if (stackSizeConfig.contains(StackSizeMenuConfig.Mining.CURRENT_SKYMALL_PERK) && (item.cleanName() == ("Sky Mall")) && (chestName == "Heart of the Mountain")) {
Expand Down

0 comments on commit 27c19a3

Please sign in to comment.