QtCraft API C++ classes QML types Handbook

QcMinecartMotion::Result Struct

struct QcMinecartMotion::Result

What a step did to a cart. More...

Header: #include <server/minecarts/QcMinecartMotion.h>

Public Variables

bool activated
bool deactivated
bool derailed
bool heldAtEnd
bool onRail
std::optional<QcMinecartMotion::Segment> segment
bool stoppedAtEnd
bool waiting

Detailed Description

Member Variable Documentation

bool Result::derailed

It left the end of a track with nothing in its way this tick and flies on off the rails.

bool Result::heldAtEnd

It stopped at the lower end of a slope that ends there: gravity holds it at that end, so it stands like on a level track (QcMinecart::Rest).

bool Result::onRail

The cart is on a rail after the step.

std::optional<QcMinecartMotion::Segment> Result::segment

The rail it is on after the step; nothing off the rails.

bool Result::stoppedAtEnd

The cart ran into the end of a track before a block this tick and stopped there.

bool Result::waiting

It reached the end of a track beyond which the chunk is not loaded, or off the rails it would move into such a chunk: it waits there with its speed.