Alright so coding GUI for a block isn't exactly as easy as I thought it would be. I started looking at the code for the FloodGate block and how it functions and it got way too complicated for me to understand it. So I'm here requesting that someone make (or attempt to make) a simple and easy block that when used by the player it opens a gui.png containing the player's inventory and 1 slot that the player can put stuff in. Example of the gui I'd like to use:
Basically, it would act as a 1-Slot Chest. (And, of course, would be compatible with Modloader)
The reason I need something like this is because it will be a simple-enough block that I can learn from to begin adding on to; in all honesty I think something like this might help a lot of modders learn to create GUI... Here's what I learned on how to code GUI, give feedback:
-First you have to have atleast four files with individual functions that would be similar to the following:
simpleblock.java - File that registers the block and defines typical block settings.
simpleblockGUI.java - File that defines foreground titles and slots, (also handles when the gui is opened?)
simpleblockGUIServer.java - Assuming this is the same as simpleblockGUI.java except handles it server-side.
simpleblockSore.java - I'm assuming this handles how the block will store the data / what to do with the data given to it?
mod_simpleblock.java - Of course the "mod_" file that gives the block a recipe / other functions / ect.
Basically, that's all I really know. Like I said, I looked at some code for Risugami's floodGate and how he coded the gui but it got way too complicated and I wasn't sure exactly what was required for a simple piece of gui. Please if anyone has extensive knowledge on how to do something like this, post a comment explaining how to or code it and send a link to download the .java files. Thanks in Advance!
I'm going to Bump this simply because I believe it is a highly wanted tutorial, and I really want to see how this is done. (Not to mention the thread spam the other day pushed it to atleast page 4, if not 5.)
In all honesty, if you don't want to make it but you still want to help you could post generic functions that have to be defined in order to create effective GUI. Or in-case you want to keep it all a secret, or something, PM me the stuff and I won't tell anyone.
Ugh i have been fighting with my mods Gui lately (it is the final step of my mod) although my interface is not like a chest i would also like to see a tutorial created for this and maybe expanded to other types of interfaces. doing a basic screen overlay gui is pretty easy. but i would have to agree with OP some of the mods out there have some hard to follow interface code for learning.