Started by
akisephila
on
Topic category: Help with MCreator software
When players enter my custom dimension, I want the contents of their inventories to be saved, then cleared, and have a different mod's armour placed in their armour slots. But there's no way for me to simply type in the item id of the mod's item in question, as the selection only allows for vanilla minecraft items, and items from my own mod.
Please help? I have made several different forum topics and none of them have received any assistance.
I also want to be able to give the player their saved inventory back upon leaving my custom dimension.
here's a hypothesis: maybe this is possible through the "for each" itemstack iterator procedure. I'll update you when I (hopefully) find an actual solution.
ok so i have just a simple update, not a complete solution. turns out using itemstack iterator didn't work, and I had to resort to making 1 itemstack variable per player's inventory slot, making it not optimal just as Klemen said in your topic of how to save player's inventory:
so, there's really no way to optimize this without code, in which situation you might wanna use a List of type ItemStack (needs verification, as I'm not experienced in that matter) to make storage more efficient, possibly along w/ some "for each" loops. not gonna go into too much detail on that one tho.
if you still want, you can bite the bullet and have to end up making &, using, like, 36 global itemstack variables, onr for each slot, if that won't be too tedious for you. that's the solution i found but was afraid that it ain't efficient... but i guess it should work, and I'm testing it currently. so simply tell me if you still want it, or just have to stick w/ coding it yourself