Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

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 server priv 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.

  • /villie Dumps details about the pointed villager to the player chat.
  • /restock Restock the pointed villager.
  • /restock_all_villagers Finds 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 is describe or restock.

Screenshots

Recipe for villager spawn egg:

  • Emerald block, bread, emerald block
  • Any enchanted book, diamond hoe, cake
  • Diamond block, lectern, diamond block

/2026/recipe-villager.png

Recipe for zombie villager spawn egg:

  • Emerald block, rotten flesh, emerald block
  • Any enchanted book, diamond hoe, cake
  • Diamond block, lectern, diamond block

/2026/recipe-zombie-villager.png

Settings

  • mcl_villager_cheats.use_timer Boolean. If true, then will restock all villagers at the times specified in the next setting.
  • mcl_villager_cheats.times Comma-separated list of times to restock all villagers, in millihours. 6100 is the default value, and is approximately 06:05, which is right after the time a player wakes up from a bed.
  • mcl_villager_cheats.verbose Boolean. Send chat messages to all players when the timer restocks villagers. Default is false.
  • mcl_villager_cheats.recipes Boolean. Enables the recipes for the villager/zombie villager spawn eggs. Default is true.
  • mcl_villager_cheats.enable_village_build_tool Enable village build tool, in creative only. Default is true.

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_chatcommand despite it being listed as available in client_lua_api.md

Comments