20 bool populated =
false;
25 void serialize(std::ostream& out)
const override = 0;
26 void deserialize(std::istream& in)
override = 0;
29 virtual BlockID
getBlock(
const glm::ivec3& pos)
const = 0;
30 virtual MultiBlock* getMultiBlock(
const glm::ivec3& pos) = 0;
32 virtual void setBlock(
const glm::ivec3& pos, BlockID block) = 0;
33 virtual void setBlock(
const glm::ivec3& pos, BlockID block,
BlockState state) = 0;
34 virtual void setMultiBlock(
const glm::ivec3& pos,
MultiBlock&& multiBlock) = 0;
40 virtual BlockState* getOrCreateState(
const glm::ivec3& pos) = 0;
42 virtual void setState(
const glm::ivec3& pos,
BlockState&& state) = 0;
43 virtual void clearState(
const glm::ivec3& pos) = 0;
46 void clear(
const glm::ivec3& pos) {
54 BlockID getBlockAndState(
const glm::ivec3& pos, BlockState*& state) {
59 BlockID getBlockAndState(
const glm::ivec3& pos,
const BlockState*& state)
const {
64 BlockID getAll(
const glm::ivec3& pos, BlockState*& state, MultiBlock*& multiBlock) {
66 multiBlock = getMultiBlock(pos);