Posted August 11, 201312 yr This might be a bit out of my league currently but I am trying to figure out how to add custom equipment slots to the players inventory. I haven't seen too much on this anywhere and was wondering how I would go about it. I do know that this requires modifying base classes, but that's more or less fine by me, I was just wondering if anyone knows a good way to do this Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more! http://i.imgur.com/ghgWmA3.jpg[/img]
August 11, 201312 yr Well in order to find out how minecraft does this, i would try and look at the different containers vanilla has and look at how it handles its itemStacks. And from there on i wouldn't edit base classes. You might want to make a custom inventory or something like that which will handle your custom "inventory". Also you would need to somehow override the vanilla minecraft gui or render your custom gui over the existing one. Thats what i would think you would have to do, obviously you would want to have a couple of other classes related to it, but right now i don't really have any source in front of me so i can't really say. Anyway good luck, its something that interests me too. Also, doing something that is just out of your league is mostly a good way to learn new things. I am the creator of the Soul Forest Mod : http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
August 11, 201312 yr Author Thanks for the advice, I managed to increase the size of the armor array, but still have no idea where the game renders the slots..... Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more! http://i.imgur.com/ghgWmA3.jpg[/img]
August 11, 201312 yr Well the Server side uses containers to see a gui, and the client side uses the gui. So for "most" of the tileEntities like chests, furnaces etc are containers and gui's. The managing of slots is done in inventories as theres the player bar (9 slots) which is an inventory and the player inventory (3x9 slots) and so on there are more inventories, they gave them a name in order to give the inventory a certain size and name etc. Also each and every slot is managened in a certain class. the normal slots like the ones in a player inventory are being created using the standard Slot, but theres more variations of slots that have different purposes like the crafting slot which you can't put anything in, you just receive the ouput of a certain recipe (craftin/smelting). And i think (i am not completely sure) that armour has their own slot aswell. I am the creator of the Soul Forest Mod : http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
August 11, 201312 yr You can look onto Tinkers Construct source. It adds tabs in player inventory with additional slots without intervention.
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.