Jump to content

GUIs in 1.3.2


mmm11105

Recommended Posts

You can look at the source from my Particle Decoration Mod, here:

http://www.minecraftforge.net/forum/index.php/topic,1909

 

It has both GUI types, with and without container.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

What type of guis, container or normal?

 

Container if possible

Just follow the furnace source, and another mod with GUI's.

You have to use IGuiHandler for registering it.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Link to comment
Share on other sites

With looking at SanAndreasP's sources, and following the tutorial here at Minecraft Forge, I have yet to be able to get a working GUI. I can set down the block, but it doesn't activate on right-click. I'm not sure if I'm missing something or what :/

 

Sources:

MechanicTools.java

TileEntityTiny.java

BlockTiny.java

ContainerTiny.java

GuiTiny.java

TinyHandler.java

inyProxy.java

Link to comment
Share on other sites

Where do you register your TileEntity? If it's not registered, it won't be placed with the block and so it won't open a GUI because it can't find any TileEntity.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

Where do you register your TileEntity? If it's not registered, it won't be placed with the block and so it won't open a GUI because it can't find any TileEntity.

And be sure to have the is useable by player and canInteractWith functions not returning false.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Link to comment
Share on other sites

Well I actually got my GUI working, but I'm having two weird bugs:

 

1. Whenever the first slot in my clickbar is empty, the text in my GUI dims from white (or whatever color) to gray (or a darker version of whatever color).

 

2. When I put a block/item in any of my slots (there are 5), it duplicates it to all of the slots, and they all disappear when I remove any one of them.

Link to comment
Share on other sites

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.