How do I make it so when an item with a tag is thrown on the ground, mobs close to it (1 block) burn?

I'm making some items to use for setting mobs on fire, cuz one of my custom mobs is weak to fire and this is one I came up with but I'm having some trouble (mostly with the fire part). So, how do I make it so when an item with a tag is thrown on the ground, mobs close to it (1 block) burn?


Solution 1:

execute as @e[type=item,nbt={Item:{id:"minecraft:blaze_rod",tag:{nbt:{Tags:["all_shall_burn"]}}}}] at @s run execute as @e[distance=0.1..1] run data merge entity @s {Fire:10s}

Will check for any blaze_rod with the tag {Tags:["all_shall_burn"]} and set entities around them on fire for 10 seconds (would not affect players as minecraft does not allow you to modify player nbt without using mods)