From bd5d50c5fc31dd2df76f19cc6b27579615149647 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:48:43 +0200 Subject: add debug data in console when silent error happens --- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index a7abe6527..75c6173ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -12,6 +12,8 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull +import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NumberUtil.isInt import at.hannibal2.skyhanni.utils.PrimitiveIngredient.Companion.toPrimitiveItemStacks @@ -259,7 +261,16 @@ object NEUItems { AdjustStandardItemLighting.adjust() // Compensate for z scaling - Minecraft.getMinecraft().renderItem.renderItemIntoGUI(item, 0, 0) + try { + Minecraft.getMinecraft().renderItem.renderItemIntoGUI(item, 0, 0) + } catch (e: Exception) { + println(" ") + println("item: $item") + println("name: ${item.name}") + println("getInternalNameOrNull: ${item.getInternalNameOrNull()}") + println(" ") + e.printStackTrace() + } RenderHelper.disableStandardItemLighting() GlStateManager.popMatrix() -- cgit