aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-03-06 23:51:02 +0100
committerGitHub <noreply@github.com>2024-03-06 23:51:02 +0100
commit0a95a791eb57a546fb5421594abae740faf1dfdb (patch)
tree82bfc13c544a60d496bab081b66ddd73e07d62a3 /src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
parent28430fe85115334fb06fb7e3cc36da819f08dace (diff)
downloadskyhanni-0a95a791eb57a546fb5421594abae740faf1dfdb.tar.gz
skyhanni-0a95a791eb57a546fb5421594abae740faf1dfdb.tar.bz2
skyhanni-0a95a791eb57a546fb5421594abae740faf1dfdb.zip
Internal Changes: Many small code cleanups (#1101)
Co-authored-by: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 12acfb2ff..67f01b531 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -63,7 +63,7 @@ object NEUItems {
allItemsCache = readAllNeuItems()
}
- @Deprecated("Use NEUInternalName rather than String", ReplaceWith("getInternalNameFromItemName()"))
+ @Deprecated("Use NEUInternalName rather than String", ReplaceWith("NEUInternalName.fromItemName(itemName)"))
fun getRawInternalName(itemName: String): String = NEUInternalName.fromItemName(itemName).asString()
fun readAllNeuItems(): Map<String, NEUInternalName> {
@@ -111,7 +111,7 @@ object NEUItems {
if (result != -1.0) return result
if (equals("JACK_O_LANTERN")) {
- return getPrice("PUMPKIN", useSellingPrice) + 1
+ return "PUMPKIN".asInternalName().getPrice(useSellingPrice) + 1
}
if (equals("GOLDEN_CARROT")) {
// 6.8 for some players
@@ -131,7 +131,7 @@ object NEUItems {
fun getItemStackOrNull(internalName: String) = internalName.asInternalName().getItemStackOrNull()
// TODO remove
- @Deprecated("Use NEUInternalName rather than String", ReplaceWith("getItemStack()"))
+ @Deprecated("Use NEUInternalName rather than String", ReplaceWith("internalName.asInternalName().getItemStack()"))
fun getItemStack(internalName: String): ItemStack =
internalName.asInternalName().getItemStack()
@@ -268,7 +268,7 @@ object NEUItems {
return result
}
- @Deprecated("Do not use strings as id", ReplaceWith("getMultiplier with NEUInternalName"))
+ @Deprecated("Do not use strings as id", ReplaceWith("NEUItems.getMultiplier(internalName.asInternalName())"))
fun getMultiplier(internalName: String, tryCount: Int = 0): Pair<String, Int> {
val pair = getMultiplier(internalName.asInternalName(), tryCount)
return Pair(pair.first.asString(), pair.second)