summaryrefslogtreecommitdiffstats
path: root/src/world/Block.cpp
blob: 54b7e5ef09e459cacf24fa38347aa77822f69e27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "Block.hpp"

Block::~Block() {}

Block::Block(unsigned short id, unsigned short state, unsigned char light) : id(id), state(state) {}

Block::Block() : id(0), state(0) {}

bool operator<(const Block &lhs, const Block &rhs) {
    if (lhs.id < rhs.id)
        return true;
    if (lhs.id == rhs.id) {
        if (lhs.state != rhs.state)
            return lhs.state < rhs.state;
    }
    return false;
}