Smarter Villagers
This Minecraft 1.21.1 datapack allows villagers to automatically convert nearby dirt, sand, and gravel into farmlands if a composter is in range, featuring decorative composters with waterlogged slabs for soil hydration.
Smarter Villagers

This datapack for Minecraft 1.21.1 Java Edition enhances villager behavior by enabling them to automatically create farmlands when near a composter.
Villagers check every 5 seconds to see if they can replace dirt, sand, or gravel under them with farmland, provided the composter is in range. To ensure better performance, the system updates every second, rather than constantly.
Key Features:
receive a temporary feather falling effect when falling from a composter, which hydrate nearby farmland. Decorative elements like a trapdoor on top and an iron shovel inside the composter allow easy identification of functional composters. To receive a temporary feather falling effect when falling from a composter, villagers receive a temporary feather falling effect when falling from a composter.
In addition, villagers get 2xWheat seeds, 1xBeetroot seeds, 1xPotato, 1xCarrot when taking over a composter (2xWheat seeds, 1xBeetroot seeds, 1xPotato, 1xCarrot)

Installation:
The datapack requires no special setup—just add it to your game, and it will start working. If for some reason it doesn't work immediately, use the /reload command.
Additional Details:
When villagers claim a composter, the blocks above and below it will be replaced, but these can be manually removed later if necessary. Destroying a composter automatically removes the decorative trapdoor and turns the block beneath it back into dirt.