Help with Minecraft 1.14

So on my Minecraft server, I had an idea to have, for example an emerald block, have a 1/500 chance of dropping a rare item (it’s a renamed firework star, whatever). Then I could use this rare item in custom crafting recipes for infused items or custom pickaxes or whatever.

I know that in 1.14, Mojang allowed the creation of custom loot table drops but I have no idea how to edit the .jsons file appropriately so this can happen. Also I have no idea how to make custom crafting recipes that take into account NBT data (in fact I have no idea how to make the recipes in the first place, I know there are tools online but none of them use NBT).

Does anyone know of any good tools or tutorials to be able to do either of the things i’ve mentioned?