Villager Stats
Easy Way to Get Information About Villagers
This data pack allows you to easily obtain detailed information about any villager. You can find out workplace and home location, experience level, inventory contents, and much more. Below you'll find a demonstration of features, installation instructions, and usage guide.
Demonstration
Installation
Download the required files:
- Main data pack archive
- Required library
Place both files in your world's datapacks/ folder or add them when creating a new world through the additional settings menu.
Usage
Look at any villager and execute one of the following commands:
/trigger villager_stats: Shows name, health, profession, biome variant, level, experience, home (bed) location, workplace, and inventory contents.

/trigger villager_block set <n>: Highlights either the villager's workplace (n = 1) or their home (bed) (n = 2). For example, to highlight the workplace, look at the villager and execute/trigger villager_block set 1.
Credits
- Mojang for adding function macros
- UUID library
- Block tag containing many non-solid blocks
- Ray casting tutorial and additions to the non-solid block tag