Jump to content

[solved]opening a custom gui for custom crafting table


Recommended Posts

Posted

Okay so I got it to open the gui, but now it closes automatically when opening

 

here is the code

 

block class

 

  Reveal hidden contents

 

 

container class

 

  Reveal hidden contents

 

 

gui class

 

  Reveal hidden contents

 

 

guihandler

 

  Reveal hidden contents

 

 

if (You.likescoding == false){
      You.goaway;
}

Posted

I didn't blindly copy and paste, I went through and attempted to understand each segment of code.  I just happened to miss one

if (You.likescoding == false){
      You.goaway;
}

Posted
  On 9/26/2013 at 9:23 AM, diesieben07 said:

Look at your

canInteractWith

method. It's pretty obvious why it's broken.

(Hint hint: this happens if you blindly copy & paste code!)

 

but anyways thanks, that was the only thing I happened to miss when I was typing the code unfortunately.

if (You.likescoding == false){
      You.goaway;
}

  • 1 month later...
Posted

when i try this code it says

A mod tried to open a gui on the server without being a NetworkMod

but i was on singleplayer

 

  Reveal hidden contents

 

Posted

add:

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

after the initialization of your mod.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted

i get error at TileEntityHandler in guihandler class

Block class

 

  Reveal hidden contents

 

Container class

 

  Reveal hidden contents

 

Gui class

 

  Reveal hidden contents

 

Guihandler class

 

  Reveal hidden contents

 

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.