Let's say that I have an item which allows a player to summon blaze fireballs (minecraft:small_fireball
) and shoot them where they are looking. Is it possible for me to somehow attribute damage done by these fireballs to the player that shot them?
When a blaze shoots the fireball and kills a player, the chat says 'Nik3141 was killed by blaze', but when I kill someone else with the fireballs, it says 'Username burned to death'. So the game knows that I am not a blaze shooting the projectile. Other than turning off death messages and trying to do my own custom death messages with tellraw
, is it possible for me to make the chat message say 'Username burned whilst trying to escape Nik3141' or something like that automatically?
This is in a datapack, so anything using advancements is an acceptable solution.
/data get entity @e[type=small_fireball,limit=1]
. If there's anything including an ID, then it's possible, otherwise not./data get
? How does that help me set the originator of the damage?