Villagers will drop spawn egg when killed by a player
This Minecraft datapack changes the loot table of villagers to drop a spawn egg.
Tested on versions 1.16 to 1.18
Tested in a Realms world for multiplayer compatibility
Lots of inspiration from Timber Forge https://www.youtube.com/channel/UC606Jh3yjNj40dcVuMwtUCw Loot table json file created using https://mcstacker.net/