Mantle

Mantle

157M Downloads

Crash in Materials & You with Smeltery Disabled

GrumpyChunks opened this issue ยท 6 comments

commented

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.

commented

This is not really an issue of disabled modules but one of a mistaken method.

https://github.com/SlimeKnights/Mantle/blob/1.12/src/main/java/slimeknights/mantle/client/book/data/element/ItemStackData.java#L80

      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.

commented

I get the identical crash in multiplayer but NOT single player. I have no modules disabled.

Full crash report here

commented

Henry is right, that probably went wrong in the 1.12 porting. The other crashes are unrelated.

commented

Please give the full crash report (paste it on something like pastebin and link it here)

commented

The book does not support disabling of modules.