Posted May 18, 201411 yr Hello, I have been having problems trying to add slots to a Inventory/Container/Gui for a Tile Entity. Sort of like how the Tool Station from Tinker's Construct Works. However, i have had trouble, because i cannot figure out how i would add one or two slots to the inventory screen dynamically, with me being able to just register where i want them and having my code add them. I get this would require a lot of code, especially with the gui, but i keep on having different exceptions thrown whenever i try to register that there could be more slots than are hard-coded into me TileEntity.
May 19, 201411 yr A possible solution would be to not hard-code the number of slots in your TileEntity, but assign and re-assign it as needed when you add or remove slots, but this seems pretty unwieldy to me. Another option would be to handle the dynamic slots separately, as in each one could be its own IInventory / InventoryBasic, which you could then add or remove as needed. Btw, TinkersConstruct is open source, so you could check out how they do it. http://i.imgur.com/NdrFdld.png[/img]
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.