I make some simple mods
Never accidentally hit your villagers again! Villager Protection disables all direct player attacks on villagers, without making them immune to everything. Villagers still can be killed indirectly such as with lava or zombifying.