Posted March 2, 201411 yr Hey guys, I need to know how to create a chest-style block. I've got my container etc, but the items won't save to it on game close. I'm guessing there's a tutorial somewhere for that though... More importantly; I need to have various slots only render and be available at certain times. As the Container class is only called once, when you load the container up, I can't just change my slot loading dynamically. Does anyone know of a way I can? What I need to do is have different slots available and usable depending on which tab of my GUI is open. Everything else for the GUI works (Packets sent to the server so it knows which tab the client is using etc); all I need to do is enable and disable the relevant slots. Anyone got any ideas? (Sorry if this post doesn't make sense, been working on this pretty much all day and very tired now. going to bed to sleep on it for a bit!) http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
March 2, 201411 yr Author The way I do it is just move the slots to the "left side" of the screen (set x position to -100 or whatever). That way they are a) not rendered and b) you can't interact with them. Then when you want then to be visible, just change their x position to the right value and move the other ones out of the way. Can you give me an example though? I've always done my slot rendering (and therefore positioning) in the Container class; which as I said is only called on the initial opening. http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
March 2, 201411 yr Author Here you go: https://github.com/Questology/Questology/blob/master/src/main/java/demonmodders/questology/container/ContainerSummoner.java The "magic" happens in setActivePage . Don't see an "Active", did you mean setCurrentPage? Anyway; is that triggered externally? I don't see how that would solve the issue, as the Container class is only called when the container is first opened? http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
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.