QtCraft API C++ classes QML types Handbook

QcVillageCommands Class

Commands about villages (decision E-403): /locate village names the nearest village with its style and street plan (decision E-409) for operators, /locate <structure> the nearest copy of a structure the generator places by itself (decision E-590) or the nearest mine shaft (with its way in), dungeon or coastal tower (decision E-911; /help locate names what the world has), /village answers the state of the nearest village as one line of JSON (tests, bots through the control interface's console request, debugging), /profession gives the nearest villager a profession and level (decision E-414; trading tests and bots, summoned villagers). More...

Header: #include <server/commands/QcVillageCommands.h>

Public Types

struct PlaceKind

Public Functions

void addTo(QcCommandRegistry &registry)

Static Public Members

const std::array<QcVillageCommands::PlaceKind, 3> placeKinds
const double professionReach
const int searchRadius

Detailed Description

Member Function Documentation

void QcVillageCommands::addTo(QcCommandRegistry &registry)

Adds the commands of this group (see the class) to registry.

Member Variable Documentation

const std::array<QcVillageCommands::PlaceKind, 3> QcVillageCommands::placeKinds

The places of the generator /locate knows besides the structures.

const double QcVillageCommands::professionReach

/profession looks for the villager this far from the player (metres).

const int QcVillageCommands::searchRadius

How far both commands look around their position (blocks).