Jump to content

[1.8][SOLVED]Can't read custom book


The_Fireplace

Recommended Posts

Ok, so I have a custom book, and I was able to read it at one point, but after adding more of them, I can no longer read any of them. Here is my code:

ItemLoreBook

https://bitbucket.org/The_Fireplace/unlogic-ii/src/2392e4e390e8d73d5dad09d7312eef6708e79d30/src/main/java/the_fireplace/unlogicii/items/ItemLoreBook.java?at=master

LoreBooks(Where I define the itemstacks and set the nbt up

https://bitbucket.org/The_Fireplace/unlogic-ii/src/2392e4e390e8d73d5dad09d7312eef6708e79d30/src/main/java/the_fireplace/unlogicii/items/LoreBooks.java?at=master

 

Any help is appreciated.

If I helped please press the Thank You button.

 

Check out my mods at http://www.curse.com/users/The_Fireplace/projects

Link to comment
Share on other sites

What the heck man? Why did you add a 2nd @Mod? And you still create the ItemStacks in a static initializer.

2nd @Mod was a quick way to add them to preinitialization. Not really necessary, and now that I think about it more, I should probably fix that.

And oops, forgot that one part about the static initializer. One minute and I will test the new code, then post if there are any issues, and if there aren't, I will mark this as solved.

If I helped please press the Thank You button.

 

Check out my mods at http://www.curse.com/users/The_Fireplace/projects

Link to comment
Share on other sites

Which part of "create them in preInit" did you still not understand?

 

Anyways, your issue is in EntityPlayerMP#displayGuiBook. Take a look at that method and the problem should be obvious.

If the problem was that it has to be a written book, why do you want me to create my itemstacks in the preinit? I have noticed that many mod authors create them there, but have never understood why, when it seems to work fine created normally.

And thanks for your patience and pointing me toward the problem.

If I helped please press the Thank You button.

 

Check out my mods at http://www.curse.com/users/The_Fireplace/projects

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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