02JanDal Posted March 11, 2013 Share Posted March 11, 2013 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 Quote Link to comment Share on other sites More sharing options...
ashtonr12 Posted March 11, 2013 Share Posted March 11, 2013 s'abit ambitous for a first mod, good luck cos i havnt the foggiest. Quote Use examples, i have aspergers. Examples make sense to me. Link to comment Share on other sites More sharing options...
02JanDal Posted March 11, 2013 Author Share Posted March 11, 2013 Well I've always been going after "if you reach for the stars you might almost reach the clouds". Quote Link to comment Share on other sites More sharing options...
ashtonr12 Posted March 11, 2013 Share Posted March 11, 2013 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. Quote Use examples, i have aspergers. Examples make sense to me. Link to comment Share on other sites More sharing options...
02JanDal Posted March 11, 2013 Author Share Posted March 11, 2013 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. Quote Link to comment Share on other sites More sharing options...
Jdb100 Posted March 11, 2013 Share Posted March 11, 2013 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 Quote Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma. Link to comment Share on other sites More sharing options...
02JanDal Posted March 12, 2013 Author Share Posted March 12, 2013 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 Quote Link to comment Share on other sites More sharing options...
SenpaiSubaraki Posted March 13, 2013 Share Posted March 13, 2013 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 Quote https://minecraft.curseforge.com/members/Subaraki/projects Link to comment Share on other sites More sharing options...
02JanDal Posted March 13, 2013 Author Share Posted March 13, 2013 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.