QtCraft API C++ classes QML types Handbook

QcWorldStart Struct

What a program asks of the local server when it opens a world (decision E-705). More...

Header: #include <worlds/QcWorldStart.h>

Public Variables

QString directory
std::optional<std::array<int, 2>> spawnColumn
int viewDistance
QcWorldInfo world

Detailed Description

QcLocalServerHost turns it into the server's configuration and adds the server's rules for it.

Member Variable Documentation

QString QcWorldStart::directory

Directory of the saved world; empty runs the world unsaved (test hooks).

std::optional<std::array<int, 2>> QcWorldStart::spawnColumn

Test hook: the player spawns above this block column (x, z) instead of the generator's spawn point.

int QcWorldStart::viewDistance

The player's view distance in chunks (QcGameSettings). No default: every caller passes the player's setting, so a start cannot silently use a different distance.

QcWorldInfo QcWorldStart::world

The world as listed or chosen: name, seed, generator with its options, and the default game mode, which counts only for an unsaved world (a saved one keeps its own in world.json).