How do I use another mod's items?

Started by akisephila on

Topic category: Help with MCreator software

Last seen on 07:56, 15. Nov 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I use another mod's items?

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.

Last seen on 07:56, 15. Nov 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I also want to be able to…
Mon, 04/12/2021 - 04:28

I also want to be able to give the player their saved inventory back upon leaving my custom dimension.

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
here's a hypothesis: maybe…
Sun, 05/23/2021 - 06:01

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.

Last seen on 08:14, 28. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok so i have just a simple…
Thu, 06/24/2021 - 00:45

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:

You could store each slot in own variable, but it is not really optimal

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