I noticed that villagers don't drop anything, and zombie villagers have no unique drops. To rectify this, I gave villagers and zombie villagers the chance to drop emeralds as well as profession-specific items! I also gave villagers and wandering traders XP drops and made it so a wandering trader will drop a random flower upon death.
Notes
- Tested in 1.16.3
- Should work in multiplayer
- Make sure to extract the file!
- Use the /reload command to load the datapack in when you get into game!
Villager
• 0-1 emeralds dropped upon death by player (+1 to max per looting level)
• 2 experience orbs dropped upon death by player
Zombie Villager
• Replaced iron ingot with emerald
Wandering Trader
• Random flower dropped upon death by player
• 2 experience orbs dropped upon death by player
Profession Specific Additions
• 30% chance to drop profession specific item upon death by player (+15% per looting level)
Armorer: Coal
Butcher: Porkchop
Cartographer: Paper
Cleric: Redstone Dust
Farmer: Bone Meal
Fisherman: Cod
Fletcher: Flint
Leatherworker: Leather
Librarian: Book
Mason: Brick
Shepherd: White Wool
Toolsmith: Coal
Weaponsmith: Coal
Edit: Cool datapack btw!
I think I'd add an item to the villager and wandering trader loot table with a custom NBT and have a function run which replaces that item entity with the appropriate XP entity. I'm pretty sure that would work.