QcAdvancementMatch Namespace
Whether an event or a player's state meets the conditions of a criterion (decision E-923). More...
| Header: | #include <server/advancements/QcAdvancementMatch.h> |
Classes
| struct | Place |
Functions
| bool | holds(const QcContentRegistry &content, const QcAdvancementConditions &conditions, const QcInventory &inventory) |
| bool | matches(const QcContentRegistry &content, const QcAdvancementConditions &conditions, const QcAdvancementEvent &event) |
| bool | matchesName(const QcContentRegistry &content, const QString &pattern, const QString &name) |
| bool | matchesPlace(const QcAdvancementConditions &conditions, const QcAdvancementMatch::Place &place) |
Detailed Description
Pure, so each condition is testable on its own.
Classes
class Place
Where a player stands, as far as the location criteria ask (each field filled only when needed). More...
Function Documentation
bool QcAdvancementMatch::holds(const QcContentRegistry &content, const QcAdvancementConditions &conditions, const QcInventory &inventory)
Returns whether inventory meets the conditions of ItemObtained: it holds at least count items matching item (names read from content).
bool QcAdvancementMatch::matches(const QcContentRegistry &content, const QcAdvancementConditions &conditions, const QcAdvancementEvent &event)
Returns whether event meets the conditions of an event trigger (everything but ItemObtained and Location), names read from content.
bool QcAdvancementMatch::matchesName(const QcContentRegistry &content, const QString &pattern, const QString &name)
Returns whether name, an item or block name of content, matches pattern, a content name or "#<tag>" of items. An empty pattern accepts everything.
bool QcAdvancementMatch::matchesPlace(const QcAdvancementConditions &conditions, const QcAdvancementMatch::Place &place)
Returns whether place meets the conditions of a location criterion.