I want to make Kill compensation using NBT Number.

Started by dkrdjdi on Tue, 10/06/2020 - 10:50

Topic category: Help with modding (Java Edition)

Last seen on 10:11, 29. Sep 2021
Joined May 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I want to make Kill compensation using NBT Number.
Tue, 10/06/2020 - 10:50

https://imgur.com/yJ7pqYG

When an entity named Gfh died,
I'll print out a message in the chat room.
Add 1 tick.

 

https://imgur.com/470AcjY

If it's more than 5 tick,
I'm gonna get diamonds.
After printing the message,
Change to 0 tick.

 

The first trigger worked successfully.

Somehow, the trigger on the diamond
It doesn't work.

I need advice on how to fix it.

Last seen on 14:01, 4. May 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think I see an issue. NBT…
Tue, 10/06/2020 - 12:22

I think I see an issue.
NBT cant be stored when an entity dies, or between entities.
I think the issue would be fixed by switching event/target entity with source entity, in the case where it adds the NBT.
As the NBT should be set to the player (the source entity of killing the mod), rather than to the mob that's killed.

Hope this helps.
 

Last seen on 10:11, 29. Sep 2021
Joined May 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you!
Tue, 10/06/2020 - 12:50

Thank you!