Stillagers Datapack
I created a datapack which helps with villager lag in trading halls.
If you name tag a villager with Stillager or stillager they will stop moving and path finding altogether. This is done by setting the NoAI tag of the villager to 1. This typically eliminates restocks, so I have a function to manually restock all trades at 8:00 AM and 2:00 PM. This is mostly consistent with vanilla behavior, villagers restock twice a day at slightly random times, but their 4 phases of the day (work, gather, wander, and sleep) can be divided into 4 segments which is the logic behind the restock times. If you want to disable this, you tag the villager with Moveager or moveager and the name disappears and their AI is restored. This is particularly useful for trading halls where villagers are locked in 1x1 spaces. In my test world where I have a trading hall with ~150 villagers, it took the tps from 15 to 20. This has tremendous lag reduction impacts without the headache of doing double-carpet tricks, and is completely optional so villagers in mob farms or those that are naturally spawned are completely unaffected; this is opt-in.
It can be downloaded here (also changelog):
- - Updated for Datapack v61, and using overlays so a single zip is valid for 1.14-1.21.4
- - Updated for Datapack v57 for 1.21.2-1.21.3
- - Updated for Datapack v48 for 1.21
- - Updated for Datapack v41 for 1.20.5-1.20.6
- - Updated for Datapack v26 for 1.20.3-1.20.4
- - Updated for Datapack v18 for 1.20.2
- - Updated for Datapack v15 for 1.20-1.20.1
- - Updated for Datapack v12 for 1.19.4
- - Updated for Datapack v10 for 1.19-1.19.3
- - Updated for Datapack v9 for 1.18.2
- - Updated for Datapack v8 for 1.18-1.18.1
- - Updated for Datapack v7 for 1.17-1.17.1
More information can be seen here:
https://www.planetminecraft.com/data-pack/stillagers/
https://modrinth.com/datapack/stillagers
https://github.com/surfrock66/Stillagers
Special thanks to the VanillaTweaks team; this was made using their SilenceMe and Track Raw Statistics datapacks as templates.
This is my first datapack, so feedback is welcome.