How to prevent certain items from being picked up when other items are in inventory?

Started by StartouchArts on

Topic category: Help with modding (Java Edition)

Last seen on 00:05, 7. Aug 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to prevent certain items from being picked up when other items are in inventory?

So I'm making a mod based on the show The Dragon Prince, and I want to replicate the magic system using items. There are 6 types of magic (Ocean, Earth, Sky, Moon, Sun, Stars), but unless someone has a special object called a Primal Stone, they can only use the one type of magic they were born connected to.

 

I want to make it so that if you have, say, an Ocean spell in your inventory, you could not pick up a Sky spell unless you have a Sky Primal Stone or an Advancement to bypass these limitations. I'm thinking I might be able to do something with NBT tags, but I honestly have no idea if this is possible.

Last seen on 13:18, 11. Oct 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think you can just cancel…
Tue, 02/08/2022 - 12:04

I think you can just cancel the pick up event.