QtCraft API C++ classes QML types Handbook

QcAnvilSwaps Namespace

Resolves the anvil swaps of all blocks once all packs are loaded (decision E-870): a block's anvilSwap gives its item the swap into into and the item into the swap back, both paid with one with. More...

Header: #include <common/content/items/QcAnvilSwaps.h>

Classes

struct Resolved

Functions

QcAnvilSwaps::Resolved resolve(const QcContentRegistry &content)

Detailed Description

A swap whose block has no item, that turns a block into itself, names an unknown item or an item that already swaps with another one is left out with a warning; the same pair declared on both blocks counts once.

Classes

class Resolved

The result of resolve(): the accepted swaps and the reasons for the left-out ones. More...

Function Documentation

QcAnvilSwaps::Resolved QcAnvilSwaps::resolve(const QcContentRegistry &content)

Goes through all blocks of content in order and returns the swaps of those with an anvilSwap, each accepted swap entered for both items.