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

Started by FragantA4sheet on

Topic category: Help with Minecraft modding (Java Edition)

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?