summaryrefslogtreecommitdiffstats
path: root/src/BlockState.h
blob: 0928dad83afc50b25793c403f251d8d4187c1e7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include "Registries/BlockTypes.h"

struct BlockState
{
	constexpr BlockState(uint_least16_t StateID) :
		ID(StateID)
	{
	}

	/** Gets the block type of this block state. */
	BlockType Type() const;

	bool operator == (BlockState Block) const
	{
		return ID == Block.ID;
	}

	bool operator != (BlockState Block) const
	{
		return ID != Block.ID;
	}

	/** The state ID of the block state. */
	uint_least16_t ID;
};