Confusion with item NBT

Started by Diskman on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Confusion with item NBT

I need some help. I'm trying to make an item that stores 'souls' as a numeric NBT value on itself, but it seems that the number resets every time I update it.
My script is as follows:

the script

 

The message sending is only for testing. When the event triggers, it tells me that the item had 0 souls, but now has 1 soul. Upon the event firing a second time, it tells me it had zero, but now has 1. I do not know what is going wrong. It always goes from zero to 1, no matter how many times I slay an entity.

 

Please help,

Diskman