Started by
TheTeamFighter
on
Topic category: Advanced modding
I was wondering if anybody knew how to make a backpack? This would be an excelent addition to my mod, but I just couldn't figure out how to make it. I want a small backpack(3x9 inventory space), a medium backpack(5x9 inventory space), and of course, a large backpack(7x9 inventory space). I would appreciate it if anyone could leave suggestions and if possible give me the coding if you figured it out. Thank you much!
err... you mean like a placable backpack where there are different slots for different backpacks? why not use GUI's? :/
How do you make GUIs then?
@CodingWithSamm seriously,you dont know how to make GUI's ?
I think he means here, how to make a GUI that holds the stuff inside when it is closed, which i personally would also like to know.
@#4 In the inventory settings of the block, uncheck so the items don't drop from it when it breaks.
hi, I know this has been posted a long time ago, but if you're here, please help... on 1.8.0, it closes and makes the item disappear. Please help.
@MCGaimingBear I believe this was fixed in the latest version. Uninstall and reinstall MCreator 1.8.0. Hope this helps!
Nope. NOT fixed, I would also love to know. I think it has something to do with NBT tags/tagging w/ code in an IDE, but no coding skills here past and before MC 1.6.4.
For those who still need help with this, I found a fix.
- First, create a item stack variable, (if its player persistent, do that.) make as many as the item slots you have
-2nd, create a procedure that is to be triggered when the gui opens.
-- for this, get the custom variable: get itemstack global __ for entity--- and put it in the: set 1 __ in slot _ of the gurrent gui
With this, do this for each variable, and each item slot. Make sure your slots are matched (variable 1 with item slot 1, ect.)
-3rd, create another procedure that is to be triggered when the gui closes.
-- for this, get the custom variable: Set itemstack global __ to: __ for entity. --- and put the: Get itemslot _ of the current GUI -- from slot&gui procedures into it.
Make sure everything is matched up, and it should work and save the data
adamtorrence do you mind showing an image of this? youre my goat