Posted October 12, 201212 yr Hey guys, At the moment, I'm attempting to create a custom container. It SHOULD be showing the following: The players inventory, the quick bar, and the 'bank' inventory. I have everything working to a certain degree, but I'm having difficulties with the slotIndex values. The problem really stems from the fact that I just don't completely understand the purpose of them, or how they achieve that purpose. I tried to decipher it by looking at the other containers/slots, but I just don't understand it. Could someone help explain, please? Thank you! Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help! http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/
October 13, 201212 yr The slot index corresponds to the slot of an ItemStack array that you should have created in your TileEntity. All of the IInventory implemented methods should point to that array. It basically maps out so that each slot in a GUI lines up with a slot in that array. So you put something in the slot that you designated slot 0 in your Container, it will go in 0 slot of the array inside the TileEntity and you can reference it from there.
October 13, 201212 yr Author Hi Denoflions, Thanks for the help! I moved on to getting the GUI to work properly. For this storage item, I'd like to have the sidebar scrolling available, like in the creative inventory, but I can't even find where this is created. How is that done? Thanks, Zetal Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help! http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/
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.