+ bool IsSurface(int index) const noexcept { return IsSurface(ToPos(index)); }
+ bool IsSurface(const Block::Pos &pos) const noexcept { return IsSurface(Pos(pos)); }
+ bool IsSurface(const Pos &pos) const noexcept;
+
+ void SetNeighbor(Chunk &) noexcept;
+ bool HasNeighbor(Block::Face f) const noexcept { return neighbor[f]; }
+ Chunk &GetNeighbor(Block::Face f) noexcept { return *neighbor[f]; }
+ const Chunk &GetNeighbor(Block::Face f) const noexcept { return *neighbor[f]; }
+ void ClearNeighbors() noexcept;
+ void Unlink() noexcept;
+ void Relink() noexcept;
+
+ // check which faces of a block at given index are obstructed (and therefore invisible)
+ Block::FaceSet Obstructed(const Pos &) const noexcept;
+
+ void Invalidate() noexcept { dirty = true; }
+
+ void SetBlock(int index, const Block &) noexcept;
+ void SetBlock(const Block::Pos &pos, const Block &block) noexcept { SetBlock(ToIndex(pos), block); }
+ void SetBlock(const Pos &pos, const Block &block) noexcept { SetBlock(ToIndex(pos), block); }