Jump to content

Recommended Posts

Posted

I want to add an in-game mod manual to the player's inventory when they player crafts one of my mod items. Just like Tinkerer's Construct. So, instead of decompiling mDiyo's mod and copying code, I'd like to do it my own way.

 

Basically when I craft an item, I'd like a prewritten book to be added to the player's inventory (or spawn at the player's feet if inv is full). I was going to have another book that was given to the player when a new world is loaded that had all of the recipes too, but I'm not sure exactly how to do it.

 

What I know:

I'd like to use the vanilla book to do this.

I know I need to add an onCrafting Event

I'd don't necessarily need to add the book on world load.

 

In summary, I am trying to dynamically write a book during an oncrafting event to add to the player's inventory to give descriptions of my mod items/blocks. Also, if someone has time to direct me, I'd like to have another book given to the player in new worlds.

 

If there is a tutorial or some information on this topic, a link will suffice. Thank you Forge Community.

Posted

For the text, i think you can use NBT to set the text, so you need to experiment a little with that. Or you could just do it as Tinker's Construct, make a new item and on right click, open a gui with the text in it.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.