#pragma once #include #include #include "Block.hpp" #include "Vector.hpp" class Section { std::vector block; std::vector light; std::vector sky; unsigned char bitsPerBlock = 0; std::vector palette; Vector worldPosition; mutable size_t hash = 0; void CalculateHash() const; std::map overrideList; public: Section(Vector pos, unsigned char bitsPerBlock, std::vector palette, std::vector blockData, std::vector lightData, std::vector skyData); Section() = default; BlockId GetBlockId(Vector pos) const; unsigned char GetBlockLight(Vector pos) const; unsigned char GetBlockSkyLight(Vector pos) const; void SetBlockId(Vector pos, BlockId value); void SetBlockLight(Vector pos, unsigned char value); void SetBlockSkyLight(Vector pos, unsigned char value); Vector GetPosition() const; size_t GetHash() const; };