Crash when looking through Lexicon
the-vindex opened this issue ยท 5 comments
It's long log, so look for at the end
java.lang.NullPointerException: Updating screen events
at net.minecraft.item.ItemStack.func_82833_r(ItemStack.java:427)
at vazkii.botania.client.gui.lexicon.GuiLexiconIndex.matchesSearch(GuiLexiconIndex.java:145)
It looks like the null-pointer is occurring inside stack.getDisplayName()
in client/gui/lexicon/GuiLexiconIndex.java
in this loop:
for(ItemStack stack : e.getDisplayedRecipes()) {
String stackName = stack.getDisplayName().toLowerCase().trim();
if(stackName.contains(search))
return true;
}
I'm assuming func_82833_r
is getDisplayName
here, which means the error lies somewhere in obtaining an item or so forth. The easiest way to fix the crash, at least, to allow for further debugging is to use hasDisplayName()
before getting the display name and replacing it with "ERROR" or similar if a display name does not exist.
Thought I'd mention an observation on this crash, it happens to me when holding the Lexicon and passing the player's crosshairs pass Buildcraft pipes
oh I fixed this in 1.8 - it's because the lexicon uses the non player sensitive version of getPickBlock which passes null to the player sensitive version which BC doesn't handle well.
Probably should be reported to BC to be honest.