Jump to content

Recommended Posts

Posted

I'm pretty new to using NBT data, and it's been months since I've been very active at making anything at all, so this is probably me missing something pretty obvious.

 

What I'm trying to do is make a custom record item that uses one item ID for multiple songs, and uses NBT data to store the song name for playing.

 

Here's my item class:

 

 

  Reveal hidden contents

 

 

Here's the item declarations and such in the main mod file:

 

 

  Reveal hidden contents

 

 

I can see the non-crafted item with no NBT data in BEI just fine.  But when I try to craft it, I get this crash.

 

From Mojang error report

 

java.lang.NullPointerException
at net.minecraft.item.ItemStack.func_77954_c(ItemStack.java:138)
at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:339)
at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443)
at net.minecraft.client.gui.inventory.GuiContainer.renderSlotItem(GuiContainer.java:456)
at net.minecraft.client.gui.inventory.GuiContainer.func_74192_a(GuiContainer.java:443)
at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:146)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1168)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:867)
at net.minecraft.client.Minecraft.run(Minecraft.java:756)
at java.lang.Thread.run(Unknown Source)

 

From Forge log:

 

2013-04-13 11:09:33 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Rendering screen
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1177)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:867)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:756)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at java.lang.Thread.run(Unknown Source)
2013-04-13 11:09:33 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.item.ItemStack.func_77954_c(ItemStack.java:138)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:339)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainer.renderSlotItem(GuiContainer.java:456)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainer.func_74192_a(GuiContainer.java:443)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:146)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1168)
2013-04-13 11:09:33 [iNFO] [sTDERR] 	... 3 more

 

So, can anyone help me with this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.