New Luanti mod: mcl_villager_cheats
I wrote a new mod for Mineclonia (ContentDB), titled Villager Cheats for Mineclonia. It is available on Internal ContentDB.
Description
This mod adds some features related to villagers.
- Users with
serverpriv can restock villager trades. I found the native Mineclonia village restock times incomplete. - Users can craft villager spawn eggs, which are very expensive.
The canonical scm repo is at https://bgstack15.ddns.net/cgit/luanti/mcl_villager_cheats, and an additional repo suitable for collaboration is at https://codeberg.org/bgstack15/mcl_villager_cheats.
Using
See the [Settings][#Settings] section for the timer function and how to use it.
Recipes can be enabled for villager spawn eggs.
Chat commands
To use the chat commands, a user must have priv server.
-
/villieDumps details about the pointed villager to the player chat. -
/restockRestock the pointed villager. -
/restock_all_villagersFinds all villagers in world and restocks them.
API
These functions are exposed under global namespace mcl_villager_cheats.
mcl_villager_cheats.get_villager_profession(object)mcl_villager_cheats.restock_if_villager(object)mcl_villager_cheats.restock_all_villagers()-
mcl_villager_cheats.find_first_villie(playername, action)Action isdescribeorrestock.
Screenshots
Recipe for villager spawn egg:
- Emerald block, bread, emerald block
- Any enchanted book, diamond hoe, cake
- Diamond block, lectern, diamond block

Recipe for zombie villager spawn egg:
- Emerald block, rotten flesh, emerald block
- Any enchanted book, diamond hoe, cake
- Diamond block, lectern, diamond block

Settings
-
mcl_villager_cheats.use_timerBoolean. If true, then will restock all villagers at the times specified in the next setting. -
mcl_villager_cheats.timesComma-separated list of times to restock all villagers, in millihours.6100is the default value, and is approximately 06:05, which is right after the time a player wakes up from a bed. -
mcl_villager_cheats.verboseBoolean. Send chat messages to all players when the timer restocks villagers. Default isfalse. -
mcl_villager_cheats.recipesBoolean. Enables the recipes for the villager/zombie villager spawn eggs. Default istrue. -
mcl_villager_cheats.enable_village_build_toolEnable village build tool, in creative only. Default istrue.
Alternatives
- None found. This is novel.
Further research
This does not work as a client side mod (CSM) because a few methods are not available to the client api.
core.objects_by_guid-
core.register_chatcommanddespite it being listed as available in client_lua_api.md

Comments