Hello,
I would like to do some changes the users inventory, namely adding another "armor" slot only allowing (and shift-click accepting only one (maybe more later) item. This should be a backpack slot, and depending on if and which item (backpack) is in the slot I want to adjust the number of slots available to the user. For the beginning I want no backpack to only be 9 items (the hot bar) and one backpack should be 3 rows (27 slots).
This is my first mod, but I have so far managed to create the backpack (and made it craftable), and the next step is to A. Add another armor slot and B. Be able to dynamically change the number of slots in the users inventory (when made smaller, items not fitting anymore should just be thrown on the floor).
I have read the "Containers and GUIs" tutorial, but I don't want to change everything (as that would mean a lot of duplicate code). Would it be possible to do this in someway with out changing everything? I think that I have created a working class that extends ContainerPlayer and I think I know how I should do for the InventoryPlayer to (and then I simply set EntityPlayer.inventory and EntityPlayer.inventoryContainer to my new classes), but how should I do for the GUI???
Here is my ContainerPlayer extending class: http://paste.minecraftforge.net/view/be8a71af
Thanks in advance