Data Packs Game Mechanic

Villagers Reborn

  • 9 views
  • save_alt 0 downloads
Compatibility
Minecraft 26.3 snapshot
Changes include
  • Advancements
  • Functions
  • Predicates
  • 1
  • 1
Elkidogz
Lvl 2 • Apprentice Miner
0

Villagers Reborn


On every server I've played, there's that one village. Raided, zombified, or emptied out for a trading hall. The houses are still standing and the bell still hangs in the square, but nobody lives there any more, and in vanilla nobody ever will again. You can't breed villagers you don't have.

I wanted those villages to come back, so I made this.

How it works


At nightfall, if you're near a village that has:
  • a bell,
  • at least 2 free beds, and
  • fewer than 2 villagers around the bell,

then one villager comes home and appears standing on one of the free beds. It's a completely normal villager that already knows its bed and its bell, and the village grows the usual vanilla way from there.

Want to rebuild a village from scratch? Put up a bell, place a few beds, and be nearby when the sun goes down.

Not a villager farm


Each bell brings back two villagers over two nights, then rests for 30 nights. That's enough to restart a village and far too slow to farm. A bed that an online player has set as their respawn point never counts as free, so nobody wakes up next to a stranger.

You'll know when it happens


A gold and green firework goes up over the bell. Players within 64 blocks see "A villager has returned to the village" on their action bar, plus a one-time Village Reborn advancement. Nobody else on the server is told, so there's no chat spam.

Light on your server


There's no tick loop. Instead of scanning the world for blocks, the pack lets a few hidden villagers do what villagers already do: look for a free bed and a bell they can walk to. That's the game's own logic, so "nearby" means about 48 blocks and reachable on foot. The check runs once a night per player and finishes in about 30 seconds at most.

Installing / removing


Drop the zip in your world's datapacks folder and run /reload. To remove it, run /function elkonia:villagers_reborn/admin/uninstall first, then delete the zip. Villagers that already came back stay as normal villagers.

Good to know

  • It only checks around online players. A village nobody visits at night won't repopulate.
  • If 2 or more villagers are within 50 blocks of you, that night is skipped, so a busy village next door can hide an empty one.
  • The daylight cycle needs to be on.
  • Offline players' beds count as free, because a datapack can't see where an offline player respawns.
  • Bells more than 16 blocks apart count as separate villages.

Minecraft 26.3, vanilla, server-side. Also on Modrinth and CurseForge. Source on GitHub (GPL-3.0).

  Have something to say?

Welcome