diff options
Diffstat (limited to '')
-rw-r--r-- | src/BlockState.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/BlockState.h b/src/BlockState.h new file mode 100644 index 000000000..0928dad83 --- /dev/null +++ b/src/BlockState.h @@ -0,0 +1,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; +}; |