From cc5ccde4c666589980eb717d2143e24ba0fde86d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 25 Feb 2023 14:15:59 +0100 Subject: Show cause of error when NEU's ItemResolutionQuery fails. --- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index d22a82759..0f7a15618 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -35,7 +35,12 @@ object NEUItems { val itemStack = ItemResolutionQuery(manager) .withKnownInternalName(internalName) - .resolveToItemStack()!! + .resolveToItemStack() + if (itemStack == null) { + val error = "ItemResolutionQuery returns null for internalName $internalName" + LorenzUtils.error(error) + throw RuntimeException(error) + } itemCache[internalName] = itemStack return itemStack.copy() } -- cgit