Replace item in inventory

Started by myxical on Fri, 05/21/2021 - 14:59

Topic category: Feature requests and ideas for MCreator

Last seen on 10:04, 18. Jul 2021
Joined May 2021

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Replace item in inventory
Fri, 05/21/2021 - 16:29 (edited)

You can set item in mainhand/offhand, you can add and remove item in inventory, but you cannot replace item in inventory. It would be like set item in mainhand to something, but instead of mainhand it's the whole inventory. Also, you can't keep NBT. It would look like this:

Replace every [item] to [same amount of OR any number] [item] in [entity] inventory keep NBT: [true/false]

You might think to yourself: "Can't you just remove and add an item?" - The answer is yes, but it will appear in the first slot it sees, not the slot it was in. That's kind of annoying, if you ask me. Thiw would be useful for items that decay over time in your inventory, or you have limited time to craft something before it disappears.

I would be glad if this was added in MCreator... unless it's already implemented and I'm blind. Also add "Get slot number of [Item] in inventory"

Edited by myxical on Fri, 05/21/2021 - 16:29