aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-10-20 19:32:09 +0100
committerGitHub <noreply@github.com>2023-10-20 20:32:09 +0200
commit3dfb81b9d5aefce9a2448d5e9e1533a28b16f11e (patch)
tree325914b6a03592e2cfe2249216b2b631401b5736 /src/main/java/at/hannibal2
parentc233f06f5d4c7b054eb7e34e3af51ee02a01387c (diff)
downloadskyhanni-3dfb81b9d5aefce9a2448d5e9e1533a28b16f11e.tar.gz
skyhanni-3dfb81b9d5aefce9a2448d5e9e1533a28b16f11e.tar.bz2
skyhanni-3dfb81b9d5aefce9a2448d5e9e1533a28b16f11e.zip
Internal Changes: getInternalName Pt 2 (#548)
Internal Changes: getInternalName Pt 2 #548
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/CruxTalismanDisplay.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt4
17 files changed, 39 insertions, 43 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
index 46b16ca1c..17a399ed9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt
@@ -13,7 +13,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.editCopy
import com.google.gson.JsonObject
@@ -105,7 +105,7 @@ object GardenCropSpeed {
} else 0.0
GardenAPI.getCurrentlyFarmedCrop()?.let {
val heldTool = InventoryUtils.getItemInHand()
- val toolName = heldTool?.getInternalName_old()
+ val toolName = heldTool?.getInternalName()?.asString()
if (toolName?.contains("DICER") == true) {
val lastCrop = lastBrokenCrop?.cropName?.lowercase() ?: "NONE"
if (toolName.lowercase().contains(lastCrop)) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
index 9b3859542..4df8fc90a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WildStrawberryDyeNotification.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.utils.ItemBlink
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUItems
@@ -33,8 +33,8 @@ class WildStrawberryDyeNotification {
val diff = System.currentTimeMillis() - lastCloseTime
if (diff < 1_000) return@execute
- val internalName = event.itemStack.getInternalName_old()
- if (internalName == "DYE_WILD_STRAWBERRY") {
+ val internalName = event.itemStack.getInternalName()
+ if (internalName.equals("DYE_WILD_STRAWBERRY")) {
val name = event.itemStack.name!!
LorenzUtils.sendTitle(name, 5.seconds)
LorenzUtils.chat("§e[SkyHanni] You found a $name§e!")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
index d37d94920..7e9c9399a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
@@ -8,7 +8,6 @@ import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.getItem
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getFarmingForDummiesCount
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPetItem
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPetLevel
@@ -74,7 +73,7 @@ object FFStats {
{ it.second }).map { (key, values) -> key to values.sum() }
.toMap() as MutableMap<FFTypes, Double>
- usingSpeedBoots = FarmingItems.BOOTS.getItem().getInternalName_old() in farmingBoots
+ usingSpeedBoots = FarmingItems.BOOTS.getItem().getInternalName().asString() in farmingBoots
getPetFFData(FarmingItems.ELEPHANT.getItem(), elephantFF)
getPetFFData(FarmingItems.MOOSHROOM_COW.getItem(), mooshroomFF)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
index 3dc13f8d5..7e79235ff 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
@@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.currentPet
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.getItem
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getItemName
import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrCommon
import at.hannibal2.skyhanni.utils.NEUItems
@@ -95,7 +95,7 @@ object FortuneUpgrades {
for (piece in equipment) {
val item = piece.getItem()
//todo tell them to buy the missing item
- if (!item.getInternalName_old().contains("LOTUS")) return
+ if (!item.getInternalName().contains("LOTUS")) return
val enchantments = item.getEnchantments() ?: emptyMap()
val greenThumbLvl = enchantments["green_thumb"] ?: 0
if (greenThumbLvl != 5 && visitors != 0.0) {
@@ -142,7 +142,7 @@ object FortuneUpgrades {
//todo needs to be called when switching pets
private fun getPetUpgrades() {
- if (currentPet.getItem().getInternalName_old().contains(";")) {
+ if (currentPet.getItem().getInternalName().contains(";")) {
when (FFStats.currentPetItem) {
"GREEN_BANDANA" -> {}
"YELLOW_BANDANA" -> {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
index 046a56d7a..39482850b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt
@@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils.chat
import at.hannibal2.skyhanni.utils.NEUItems
@@ -118,7 +118,7 @@ object GardenPlotIcon {
return
}
val copyStack = copyStack ?: return
- plotList[event.slotId] = copyStack.getInternalName_old()
+ plotList[event.slotId] = copyStack.getInternalName().asString()
cachedStack[event.slotId] = copyStack
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
index c37d660b3..f44970145 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import at.hannibal2.skyhanni.utils.RenderUtils.interpolate
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
@@ -53,7 +53,7 @@ class HighlightBonzoMasks {
}
private fun maskType(item: ItemStack): String? {
- return when (item.getInternalName_old()) {
+ return when (item.getInternalName().asString()) {
"STARRED_BONZO_MASK" -> "BONZO_MASK"
"BONZO_MASK" -> "BONZO_MASK"
"SPIRIT_MASK" -> "SPIRIT_MASK"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
index 7501f8d70..28b0d1d1f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
@@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.data.ClickType
import at.hannibal2.skyhanni.events.BlockClickEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
-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.toChromaColor
import at.hannibal2.skyhanni.utils.RenderUtils
@@ -35,9 +35,9 @@ class FireVeilWandParticles {
if (!LorenzUtils.inSkyBlock) return
if (event.clickType == ClickType.RIGHT_CLICK) {
- val internalName = event.itemInHand?.getInternalName_old() ?: return
+ val internalName = event.itemInHand?.getInternalName() ?: return
- if (internalName == "FIRE_VEIL_WAND") {
+ if (internalName.equals("FIRE_VEIL_WAND")) {
lastClick = System.currentTimeMillis()
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
index b32f19015..af8b3bbbe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt
@@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
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.SkyBlockItemModifierUtils.getRecipientName
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -14,7 +14,7 @@ class RestorePieceOfWizardPortalLore {
fun onTooltip(event: LorenzToolTipEvent) {
if (!config.restorePieceOfWizardPortalLore) return
val stack = event.itemStack
- if (stack.getInternalName_old() != "WIZARD_PORTAL_MEMENTO") return
+ if (!stack.getInternalName().equals("WIZARD_PORTAL_MEMENTO")) return
val recipient = stack.getRecipientName() ?: return
if (!event.toolTip[5].contains(recipient)) {
event.toolTip.add(5, "§7Earned by: $recipient")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
index 277c84735..79f555300 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt
@@ -10,7 +10,6 @@ import at.hannibal2.skyhanni.events.RenderItemTooltipEvent
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
import at.hannibal2.skyhanni.utils.ItemUtils.getItemName
import at.hannibal2.skyhanni.utils.ItemUtils.getItemNameOrNull
import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull
@@ -231,7 +230,7 @@ object EstimatedItemValue {
private fun addAttributeCost(stack: ItemStack, list: MutableList<String>): Double {
val attributes = stack.getAttributes() ?: return 0.0
- var internalName = stack.getInternalName_old().removePrefix("VANQUISHED_")
+ var internalName = stack.getInternalName().asString().removePrefix("VANQUISHED_")
val kuudraSets = listOf("AURORA", "CRIMSON", "TERROR", "HOLLOW")
var genericName = internalName
if (kuudraSets.any { internalName.contains(it) }
@@ -653,7 +652,7 @@ object EstimatedItemValue {
"ZOMBIE_COMMANDER_WHIP",
)
- val internalName = stack.getInternalName_old()
+ val internalName = stack.getInternalName().asString()
for ((rawName, rawLevel) in enchantments) {
// efficiency 1-5 is cheap, 6-10 is handled by silex
if (rawName == "efficiency") continue
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
index 74a2e0ac3..fb37bfabe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
@@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.BlockUtils
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt
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.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
@@ -28,7 +28,7 @@ class RiftAgaricusCap {
}
private fun updateLocation(): LorenzVec? {
- if (InventoryUtils.getItemInHand()?.getInternalName_old() != "FARMING_WAND") return null
+ if (InventoryUtils.getItemInHand()?.getInternalName() != RiftAPI.farmingTool) return null
val currentLocation = BlockUtils.getBlockLookingAt() ?: return null
when (currentLocation.getBlockStateAt().toString()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
index 27f113d0e..0058971ef 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
@@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt
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.LocationUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
@@ -40,9 +40,7 @@ class RiftWiltedBerberisHelper {
list = list.editCopy { removeIf { System.currentTimeMillis() > it.lastTime + 500 } }
- hasFarmingToolInHand = InventoryUtils.getItemInHand()?.getInternalName_old()?.let {
- it == "FARMING_WAND"
- } ?: false
+ hasFarmingToolInHand = InventoryUtils.getItemInHand()?.getInternalName() == RiftAPI.farmingTool
if (Minecraft.getMinecraft().thePlayer.onGround) {
val block = LocationUtils.playerLocation().add(0, -1, 0).getBlockAt().toString()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
index 6775230b1..61f7b55a6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
@@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.utils.EntityUtils.getEntities
import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture
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.toChromaColor
import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -31,7 +31,7 @@ class RiftOdonata {
}
private fun checkHand() {
- hasBottleInHand = InventoryUtils.getItemInHand()?.getInternalName_old() == "EMPTY_ODONATA_BOTTLE"
+ hasBottleInHand = InventoryUtils.getItemInHand()?.getInternalName()?.equals("EMPTY_ODONATA_BOTTLE") ?: false
}
private fun findOdonatas() {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/CruxTalismanDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/CruxTalismanDisplay.kt
index 2741694ed..a3ac3cadb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/CruxTalismanDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/CruxTalismanDisplay.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
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.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
@@ -84,7 +84,7 @@ object CruxTalismanDisplay {
fun onTick(event: LorenzTickEvent) {
if (!isEnabled()) return
if (!event.repeatSeconds(2)) return
- if (!InventoryUtils.getItemsInOwnInventory().any { it.getInternalName_old().startsWith(partialName) }) return
+ if (!InventoryUtils.getItemsInOwnInventory().any { it.getInternalName().startsWith(partialName) }) return
displayLine.clear()
bonusesLine.clear()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
index c6337866e..06ec9cd97 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
@@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI.motesNpcPrice
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.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector
@@ -108,12 +108,13 @@ class ShowMotesNpcSellPrice {
itemMap.clear()
for ((index, stack) in stacks) {
val itemValue = stack.motesNpcPrice() ?: continue
- if (itemMap.contains(stack.getInternalName_old())) {
- val (oldIndex, oldValue) = itemMap[stack.getInternalName_old()] ?: return
+ val internalName = stack.getInternalName().asString()
+ if (itemMap.contains(internalName)) {
+ val (oldIndex, oldValue) = itemMap[internalName] ?: return
oldIndex.add(index)
- itemMap[stack.getInternalName_old()] = Pair(oldIndex, oldValue + itemValue)
+ itemMap[internalName] = Pair(oldIndex, oldValue + itemValue)
} else {
- itemMap[stack.getInternalName_old()] = Pair(mutableListOf(index), itemValue)
+ itemMap[internalName] = Pair(mutableListOf(index), itemValue)
}
}
inInventory = true
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
index 7ff28f287..c3d5d9545 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.data.SlayerAPI
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.utils.EntityUtils
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.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -41,7 +40,7 @@ class SlayerItemsOnGround {
if (SlayerAPI.ignoreSlayerDrop(name)) continue
// happens in spiders den sometimes
if (itemStack.item == Items.spawn_egg) continue
- if (itemStack.getInternalName_old() == "") continue
+ if (itemStack.getInternalName().equals("")) continue
val (itemName, price) = SlayerAPI.getItemNameAndPrice(itemStack.getInternalName(), itemStack.stackSize)
if (config.minimumPrice > price) continue
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
index 4021209f6..0b98116a2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt
@@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.SlayerChangeEvent
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.nameWithEnchantment
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -123,7 +123,7 @@ class SlayerRngMeterDisplay {
} else {
storage.itemGoal = selectedItem.nameWithEnchantment
val jsonObject = Constants.RNGSCORE["slayer"].asJsonObject.get(getCurrentSlayer()).asJsonObject
- storage.goalNeeded = jsonObject.get(selectedItem.getInternalName_old()).asLong
+ storage.goalNeeded = jsonObject.get(selectedItem.getInternalName().asString()).asLong
}
update()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
index d5a957160..fa94cb21d 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt
@@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.mixins.hooks.ItemStackCachedData
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
@@ -32,7 +32,7 @@ object SkyBlockItemModifierUtils {
it - 5 - getBaseSilexCount()
}?.takeIf { it > 0 }
- private fun ItemStack.getBaseSilexCount() = when (getInternalName_old()) {
+ private fun ItemStack.getBaseSilexCount() = when (getInternalName().asString()) {
"STONK_PICKAXE" -> 1
"PROMISING_SPADE" -> 5