I want to make Kill compensation using NBT Number.

Started by dkrdjdi on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want to make Kill compensation using NBT Number.

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.

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.
 

Joined May 2013
Points:

User statistics:

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

Thank you!