Only allow player to hold one of an item at once

Started by Aksumite on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Only allow player to hold one of an item at once

I have a powerful item, and was wondering if you can prevent the player from picking up/holding more than one of the item at once.

Thanks!

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Simply set the max stack…
Sat, 05/23/2020 - 12:48

Simply set the max stack size to 1 for the item.

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This wouldn't solve the…
Sat, 05/23/2020 - 20:17

This wouldn't solve the problem, because the player can still pick it up in a different slot. What I meant was only being able to hold one of the item in the entire inventory.

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To not allow pickup, make a…
Sat, 05/23/2020 - 23:24

To not allow pickup, make a procedure element and on event trigger select from the pulldown "when entity picks up item".

Use the code block "has provided entity (item) in inventory". IF blocks to check if true then don't allow pickup.