Confusion with item NBT

Started by Diskman on Thu, 05/27/2021 - 20:08

Topic category: Help with modding (Java Edition)

Last seen on 20:10, 28. Jul 2021
Joined May 2020

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Confusion with item NBT
Thu, 05/27/2021 - 20:08

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,