To start adding compostables via JSON files, first of all you have to make a data pack, and create a few file folders. You path should look like this data/your_mod_id/jinxedlib/compostables
Then you create a JSON file in the compostables folder, this can be named anything but I recommend naming it something sensible.
My JSON file named 'composting' looks like this:{
"values": {
"minecraft:diamond": 0.65,
"minecraft:gold_ingot": 0.86,
"minecraft:iron_ingot": 0.23
},
"can_villager_compost": false
}
Values takes in an item and a float, the float is the composting chance.
Can villager compost is a Boolean and when true the villager will be able to compost any items in 'values'
I recommend making two JSON files in the compostables folder, one for items the villager and the player can compost and one for items that only the player can compost
If you get stuck or have any problems feel free to join my Discord Server for help!