Posted March 11, 201312 yr 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
March 11, 201312 yr s'abit ambitous for a first mod, good luck cos i havnt the foggiest. Use examples, i have aspergers. Examples make sense to me.
March 11, 201312 yr Author Well I've always been going after "if you reach for the stars you might almost reach the clouds".
March 11, 201312 yr instead of trying to edit the inventory screen you could just have it so that when you right click with the backpack you the equivilent of a chest and the you could have different size backpacks easier. i dont know how do that either but its a damn sight lot more easier than your prev ideas. Use examples, i have aspergers. Examples make sense to me.
March 11, 201312 yr Author That would very likely be a lot easier, but it's for the first already done (I think Forestry) and second that's not the idea. The real idea is that the player should always have less inventory space than now, but have a bit more with a backpack, so I would still have to edit the inventory GUI.
March 11, 201312 yr Ok first of all the idea of adding extra ingame menu slots wouldn't work unless you edit guiInGame and to add another slot you have to edit the inventory gui and container as well this is just something i though as the extra rows would take up a lot of the space in the game Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
March 12, 201312 yr Author Ok, I took a look at the source for NEI which edits some base classes to change things and well... Going to do something else... I think I could get access transformers working, but... well... Should at least a hook to add extra "armor" slots be something that would be nice to have in forge? There are loads of other mods too that are doing things like this too (I don't remember the name, but there was one that adds glowes, capes etc.) Inventory size might be a bit to specific though. Jan
March 13, 201312 yr http://www.minecraftforum.net/topic/1688664-147-sspsmp-v71-rpg-inventory-mod-3d-items-jewelery-capes-and-much-more/ that one ? only one i know with capes and jewels mine btw. I can tell for sure that adding an inventory like this is a real b*tch. not talking about smp compatibility x.x https://minecraft.curseforge.com/members/Subaraki/projects
March 13, 201312 yr Author Yepp, that one. Add to that that I don't want to have a second inventory page, and I want to to be SMP... Well, well, going to do something else for my first mod Jan
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.