Posted August 29, 201510 yr I want to make a block that is similar to a chest, but not exactly a chest, it doesn't open like a chest does so the common method of "copy chest code" won't help me. Does anyone know how I make a TileEntitySpecialRenderer know when the GUI is opened and closed? I cannot find any good tutorials on it. Check out my Mod: The RPCraft Toolkit!
August 29, 201510 yr Hint of the day: Read the chest code and understand it. Best tutorial u can find
August 29, 201510 yr Author Okay, I think I got it now, you have to get the player interacting with the block and test if "player.opencontainer" is your container. That seems simple enough. I still want to know how the BlockChest OnBlockActivated works though. It calls player.openGUIChest(IInventory) and it's an empty function and I couldn't find it overridden anywhere. Check out my Mod: The RPCraft Toolkit!
August 30, 201510 yr Okay, I think I got it now, you have to get the player interacting with the block and test if "player.opencontainer" is your container. That seems simple enough. I still want to know how the BlockChest OnBlockActivated works though. It calls player.openGUIChest(IInventory) and it's an empty function and I couldn't find it overridden anywhere. Youll have to have a guiHandler. In there youll have to define which GUi should be opened on Client/Server while on server - youll have to open Containers, cuz Guis are client only.
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.