Crash in Materials & You with Smeltery Disabled
GrumpyChunks opened this issue ยท 6 comments
Steps to recreate:
- Install Forge (2501 in my case)
- Install Tinkers Construct (1.12-2.7.4.34)
- Install Mantle (1.12-1.3.1.21)
- Disable Smeltery in TinkersModules.cfg
- Create new SSP world
- Open Materials & You Book
- Turn to first page
Results in a crash, with following (trimmed) stackdump.
java.lang.NullPointerException: Rendering screen
at slimeknights.mantle.client.book.data.element.ItemStackData.getItem(ItemStackData.java:81)
at slimeknights.mantle.client.book.data.element.ItemStackData.getItems(ItemStackData.java:52)
at slimeknights.mantle.client.gui.book.element.ElementSection.draw(ElementSection.java:60)
at slimeknights.mantle.client.gui.book.GuiBook.func_73863_a(GuiBook.java:289)
at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:349)
at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1124)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1117)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
at net.minecraft.client.main.Main.main(SourceFile:123)
Turning the smeltery back on fixes the problem, but the problem predictably returns when it's disabled again.
This is not really an issue of disabled modules but one of a mistaken method.
NBTTagCompound display = itemStack.getSubCompound("display");
display.setString("Name", "\u00A7rUnknown Item");
but getSubCompound()
will return null if that sub compound doesn't exist. You want getOrCreateSubCompound()
instead.
I get the identical crash in multiplayer but NOT single player. I have no modules disabled.
Full crash report here
Henry is right, that probably went wrong in the 1.12 porting. The other crashes are unrelated.
Please give the full crash report (paste it on something like pastebin and link it here)