From 0a95a791eb57a546fb5421594abae740faf1dfdb Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:51:02 +0100 Subject: 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> --- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt') 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 { @@ -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 { val pair = getMultiplier(internalName.asInternalName(), tryCount) return Pair(pair.first.asString(), pair.second) -- cgit