How to set an Entity as caller of a command depending on NBT data
Hey, I'm making something pretty basic
I just want to buff TNT replacing it with a creeper right before it explodes, but the NBT syntax is really confusing to me (this is my first time making a datapack without just altering a pre-existing one)
Here's the function file:
Continue to help postexecute as @e[type=minecraft:tnt] at @s if data entity @s fuse:2 run return run summon minecraft:creeper ~ ~ ~ {NoAI:1b,ExplosionRadius:10,Fuse:0} execute as @e[type=minecraft:tnt,Fuse:0] at @s run kill @s
It runs every tick, and I tried two methods for picking out a primed TNT entity with a fuse of 0, but neither worked