Are villager trades hardcoded?

I want to make a datapack for my server that fixes villager trades so that you can't get Mending as a first trade by constantly replacing workstations. Is this doable with datapacks or should I do it with a spigot plugin instead?

Continue to help post