Jump to content

Recommended Posts

Posted

I'm trying to make a book like that of Thaumcraft and Mystcraft that you right-click the item and it opens a gui that I later will have a functionality such as controls for a machine receptacle. I am fairly new to modding minecraft and I know a decent bit of java but this is completely dumbfounding me. I have got it so far to have the item class, but I cant get a gui to appear on right-click

 

This is my item class

 

  Reveal hidden contents

 

My ItemNC class

 

  Reveal hidden contents

 

ModItems

 

  Reveal hidden contents

 

I have figured that I need to make a GuiScreen class since I can't use tile entities for an item. I have been looking at the GuiScreenBook.class but I cannot make much sense out of it where I get a usable result. I have been google'ing solutions for a while now and either I am doing it wrong or I can't find anything other than GUI's for blocks. I would prefer guidance as to what to do/look for instead of handouts. I appreciate any help and advice. Thanks

Posted

change

 

  Reveal hidden contents

 

to

 

  Reveal hidden contents

 

also make sure you arent giving the wrong instance of your mod

Posted

That doesn't seem to work I am still not having any gui's pop up on rightclick. I'm fairly sure I am using the correct instance, but how would I tell for sure?

This is my main class file

 

  Reveal hidden contents

 

Posted

Okay I figured some of this out and I now have a GUI appearing on right click, but how would I do this without mod loader?

 

ItemNecronomicon

 

  Reveal hidden contents

 

GuiNecronomicon

 

  Reveal hidden contents

 

Posted

How would I go about doing that? I'm sorry I just don't see ANY tutorials whatsoever for making GUI's for items in forge. The best I found was modloader and I would prefer not using modloader. I'm trying to basically have it like in thaumcraft where you will open a book and it will have instructions/recipes to the things the player will be doing, as well as the book being used in a receptacle and when the book is in the receptacle you will have a new gui extending from the block that will act as a container/tile entity. I'm not sure if what I am trying to do with the book requires it to be a tile entity or a container, and what code is required to set it up in the guiscreen/proxy/item class or where to find references on how to do it. I have it working perfectly with the block acting as a container and it has its gui but this has me completely stumped.

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.