How to add a custom number NBT to a player holding a specific item.

Started by FragantA4sheet on

Topic category: Help with modding (Java Edition)

Last seen on 07:21, 7. Feb 2023
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to add a custom number NBT to a player holding a specific item.

Hi there, title.

What I'm looking for is how to set a custom number NBT tag to a set number of the entity holding a sword.

I tried to set event/target entity custom number NBT in a procedure and link it to update on holding item tick or when swung or when hit a living entity under the triggers section of the tool, but none of these seem to work, I feel like I'm missing something?