QtCraft API C++ classes QML types Handbook

QcServerLimits Struct

Budgets and bounds of the server's simulation that an operator may tune (decision E-349): read from the object "limits" of server.json on a dedicated server, of world.json in a single-player world (a dedicated server ignores the world's). More...

Header: #include <server/core/QcServerLimits.h>

Public Types

struct Field
struct Read

Public Functions

QStringList lines() const
qint64 scheduleReserve() const
QJsonObject toJson() const

Public Variables

qint64 ambientCreaturesPerPlayer
qint64 blockUpdatesPerTick
qint64 bredPerKind
qint64 breedingCrowd
qint64 chunkGroupLimit
qint64 chunkLoaders
qint64 chunkLoadersPerPlayer
qint64 chunkTicketTicks
qint64 chunkTickets
qint64 chunkTicketsPerTick
qint64 chunkUnloadsPerTick
qint64 commandBlockUpdates
qint64 crowdIdle
qint64 crowdThrottled
qint64 experienceOrbs
qint64 explosionBlocks
qint64 explosionBlocksPerTick
qint64 explosionsPerTick
qint64 fallingBlocks
qint64 fireSpreadRadius
qint64 fireStepsPerTick
qint64 fires
qint64 firesPerChunk
qint64 forcedChunks
qint64 guardians
qint64 hopperBudget
qint64 hopperCooldownTicks
qint64 itemsAwake
qint64 itemsQueued
qint64 itemsTotal
qint64 largeWaterCreaturesPerPlayer
qint64 leafChecksPerTick
qint64 leafDecaysPerTick
qint64 leafPendingChecks
qint64 liquidPlannedSteps
qint64 liquidStepsPerTick
qint64 maxArmourStands
qint64 maxBoats
qint64 maxContainers
qint64 maxHangings
qint64 maxMachines
qint64 maxMinecarts
qint64 maxSaplings
qint64 monstersPer289Chunks
qint64 movingBlocksShown
qint64 passiveCreaturesPerPlayer
qint64 pathLength
qint64 pathNodesPerSearch
qint64 pathNodesPerTick
qint64 primedExplosives
qint64 projectiles
qint64 projectilesPerChunk
qint64 randomTicksPerSection
qint64 savedBlockUpdates
qint64 signalBudget
qint64 signalMaxPendingChanges
qint64 signalMinimumStep
qint64 signalScheduleReservePercent
qint64 signalWorkPerChange
qint64 spawnerCreatures
qint64 summonLimit
qint64 unsavedChunks
qint64 villageBeds
qint64 villageGolems
qint64 villageWorkstations
qint64 villagerHarvestsPerTick
qint64 villagerRoutesPerTick
qint64 villagerThoughtsPerTick
qint64 villagers
qint64 villagersPerVillage
qint64 villages
qint64 waitingBlockUpdates
qint64 waterCreaturesPerPlayer

Static Public Members

const QcServerLimits::Field *field(QStringView key)
std::span<const QcServerLimits::Field> fields()
QcServerLimits::Read fromJson(const QJsonObject &json, const QString &source)

Detailed Description

Every value has a default and a valid range; a value out of range is clamped with a warning, an unknown key is reported and ignored. New limits are one line in fields().

Member Function Documentation

[static] const QcServerLimits::Field *QcServerLimits::field(QStringView key)

Returns the limit named key; nullptr when there is none.

[static] std::span<const QcServerLimits::Field> QcServerLimits::fields()

Returns every limit.

[static] QcServerLimits::Read QcServerLimits::fromJson(const QJsonObject &json, const QString &source)

Returns the defaults with the values of json (clamped); the warnings are prefixed with source (e.g. "server.json").

QStringList QcServerLimits::lines() const

Returns "key = value (range low..high): description" per limit.

qint64 QcServerLimits::scheduleReserve() const

Returns the part of the signal budget block changes leave for due scheduled ticks.

QJsonObject QcServerLimits::toJson() const

Returns the limits as the "limits" object, every key.

Member Variable Documentation

qint64 QcServerLimits::experienceOrbs

Experience orbs in the world (E-398); beyond, dropped experience joins the nearest orb.

qint64 QcServerLimits::fallingBlocks

Falling blocks as entities at once (E-055); beyond, they drop straight or wait (E-288).

qint64 QcServerLimits::guardians

Awake guardians of structure zones in the world at most (decision E-591; sand golems in desert temples); zones bring forth none while there are as many (0: none at all). Each zone also keeps to its own max.

qint64 QcServerLimits::hopperBudget

Signal Hoppers acting per tick at most (E-344).

qint64 QcServerLimits::hopperCooldownTicks

Ticks a hopper rests after moving an item (the reference's 8).

qint64 QcServerLimits::largeWaterCreaturesPerPlayer

Larger water creatures (the squid, decision E-974) that spawn by themselves per player, apart from the fish.

qint64 QcServerLimits::maxBoats

Boats in the world (E-920; placing more is refused).

qint64 QcServerLimits::maxHangings

Item frames and paintings in the world (E-790; placing more is refused).

qint64 QcServerLimits::movingBlocksShown

Blocks shown sliding behind pistons (E-337).

qint64 QcServerLimits::randomTicksPerSection

Random ticks per marked section and tick (growing plants, crops, soil; E-289): more makes plants grow faster, as the reference's randomTickSpeed.

qint64 QcServerLimits::signalBudget

Signal Dust: work per tick (dust looked at, components, pushed blocks; E-335).

qint64 QcServerLimits::signalMaxPendingChanges

Block changes near circuits waiting at most; further ones are dropped with a warning.

qint64 QcServerLimits::signalMinimumStep

... but at least this many changes, so a tick always gets on.

qint64 QcServerLimits::signalScheduleReservePercent

Share of the budget (percent) that block changes leave for due scheduled ticks.

qint64 QcServerLimits::signalWorkPerChange

A step takes at most the budget left divided by this (the work of one change), ...

qint64 QcServerLimits::spawnerCreatures

Awake creatures from monster spawners in the world at most (decision E-520); spawners wait while there are as many. They do not count against the natural caps per player.

qint64 QcServerLimits::summonLimit

Creatures summoned by /summon awake at once at most (E-351); natural ones do not count, 0 switches summoning creatures off (armour stands are no creatures and stay possible).

qint64 QcServerLimits::villageGolems

Iron golems in the world beyond which villagers summon no more (decisions E-415, E-470; 0: none).

qint64 QcServerLimits::waterCreaturesPerPlayer

Water creatures (fish, decision E-502) that spawn by themselves per player; they never count against the other caps.