import os
for json in os.listdir(r'E:\Minecraft\Random_Appearance\Resourcepack\assets\minecraft\items') :
    print(json)
    with open(json, 'w') as text:
        text.write("""{
  "function": "minecraft:set_components",
  "components": {
    "minecraft:item_model": "minecraft:%s"
  }
}"""%json[:-5])
