How to have a mob drop occur only when a TNT kills them.
I want a custom drop to happen when a creeper is killed by a TNT. I've tested a couple of methods already and none have seemed to work this is the current code I'm working on (note this is in a list of conditions):
"conditions" : [ { "condition": "minecraft:damage_source_properties", "predicate" :{ "direct_entity": { "types" : [ { "type" : "minecraft:tnt" }, { "type" : "minecraft:tnt_minecart" } ] }, "source_entity" : { "types" : [ { "type" : "minecraft:tnt" }, { "type" : "minecraft:tnt_minecart" } ] } } }, { "condition" : "minecraft:random_chance", "chance" : 1 }