Skip to content

Commit

Permalink
[CHERRYPICK ABLEVELING] 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 ee395a7 commit 2ca6da3
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 MenuItemDisplayOverlaySBLeveling {
class MenuItemDisplayOverlaySBLeveling : AbstractMenuStackSize() {
private val guideTaskChestNamePattern = ((".*(Guide |Task).*").toPattern())
private val progressPatternLoreLinePattern = ((".*Progress.*: (§.)?(?<percent>[0-9]+)(\\.[0-9]*)?(§.)?%").toPattern())
private val checkmarkItemNamePattern = (("✔.*").toPattern())
Expand All @@ -26,10 +26,10 @@ class MenuItemDisplayOverlaySBLeveling {
event.stackTip = getStackTip(event.stack)
}

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

if (stackSizeConfig.contains(StackSizeMenuConfig.SBLeveling.GUIDE_PROGRESS)) {
Expand Down

0 comments on commit 2ca6da3

Please sign in to comment.