aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt14
4 files changed, 11 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt
index cf629bcb5..0ae437db7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt
@@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.fishing.trophy
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUItems
@@ -18,7 +18,7 @@ class TrophyFishFillet {
fun onTooltip(event: LorenzToolTipEvent) {
if (!isEnabled()) return
if (event.slot.inventory.name.contains("Sack")) return
- val internalName = event.itemStack.getInternalName_old()
+ val internalName = event.itemStack.getInternalName().asString()
val trophyFishName = internalName.substringBeforeLast("_")
.replace("_", "").lowercase()
val trophyRarityName = internalName.substringAfterLast("_")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index 64ef4e9df..3cd2e0a39 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.composter.ComposterAPI.getLevel
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.KeyboardManager
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -450,7 +451,7 @@ class ComposterOverlay {
BazaarApi.searchForBazaarItem(itemName, itemsNeeded)
return
}
- val having = InventoryUtils.countItemsInLowerInventory { it.getInternalName() == internalName.asInternalName() }
+ val having = InventoryUtils.countItemsInLowerInventory { it.getInternalName_old() == internalName }
if (having >= itemsNeeded) {
LorenzUtils.chat("§e[SkyHanni] $itemName §8x${itemsNeeded} §ealready found in inventory!")
return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt
index 1718adf7d..1f35e0647 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingArmorDrops.kt
@@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.utils.InventoryUtils
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
@@ -100,7 +100,7 @@ class FarmingArmorDrops {
private fun checkArmor() {
val armorPieces = InventoryUtils.getArmor()
- .mapNotNull { it?.getInternalName_old() }
+ .mapNotNull { it?.getInternalName()?.asString() }
.count { armorPattern.matcher(it).matches() }
hasArmor = armorPieces > 1
}
@@ -130,7 +130,7 @@ class FarmingArmorDrops {
val armorDropName = crop.specialDropType
val armorName = armorDropInfo[armorDropName]?.armor_type ?: return 0.0
val pieceCount = InventoryUtils.getArmor()
- .mapNotNull { it?.getInternalName_old() }
+ .mapNotNull { it?.getInternalName()?.asString() }
.count { it.contains(armorName) || it.contains("FERMENTO") }
val dropRates = armorDropInfo[armorDropName]?.chance ?: return 0.0
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
index 00e5653dd..f0ad1baff 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
@@ -8,8 +8,7 @@ import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType
import at.hannibal2.skyhanni.utils.InventoryUtils
-import at.hannibal2.skyhanni.utils.ItemUtils
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -42,12 +41,7 @@ class CaptureFarmingGear {
fun captureFarmingGear() {
val farmingItems = farmingItems ?: return
- val resultList = mutableListOf<String>()
-
val itemStack = InventoryUtils.getItemInHand() ?: return
- val itemID = itemStack.getInternalName_old()
- resultList.add(itemStack.displayName.toString())
- resultList.add(itemID)
val currentCrop = itemStack.getCropType()
@@ -63,7 +57,7 @@ class CaptureFarmingGear {
}
for (armor in InventoryUtils.getArmor()) {
if (armor == null) continue
- val split = armor.getInternalName_old().split("_")
+ val split = armor.getInternalName().asString().split("_")
if (split.first() in farmingSets) {
for (item in FarmingItems.entries) {
if (item.name == split.last()) {
@@ -99,7 +93,7 @@ class CaptureFarmingGear {
val outdatedItems = outdatedItems ?: return
if (event.inventoryName == "Your Equipment and Stats") {
for ((_, slot) in event.inventoryItems) {
- val split = slot.getInternalName_old().split("_")
+ val split = slot.getInternalName().asString().split("_")
if (split.first() == "LOTUS") {
for (item in FarmingItems.entries) {
if (item.name == split.last()) {
@@ -136,7 +130,7 @@ class CaptureFarmingGear {
var highestBeeRarity = (farmingItems[FarmingItems.BEE]?.getItemRarityOrNull()?.id ?: -1) - 1
for ((_, item) in event.inventoryItems) {
- val split = item.getInternalName_old().split(";")
+ val split = item.getInternalName().asString().split(";")
if (split.first() == "ELEPHANT" && split.last().toInt() > highestElephantRarity) {
farmingItems[FarmingItems.ELEPHANT] = item
outdatedItems[FarmingItems.ELEPHANT] = false