Help with checking items in inventory

Started by SydneyZeQueen on

Topic category: Help with modding (Java Edition)

Last seen on 23:32, 11. Dec 2020
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with checking items in inventory

I am trying to make it so a player can only have one of a certain items in their inventory at any time, and the only thing I can find that would help with that is "HAS EVENT/TARGET ENTITY IN INVENTORY <ITEM>", but that would make it so as soon as the player gets the item, it gets deleted. Any other blocks I should look for?

Use iterate items in entity…
Fri, 12/11/2020 - 09:13

Use iterate items in entity inventory and sum number of desired items and then check if the number is large enough for your requirements.