4#ifndef LODESTONE_LEVELCHUNK_H
5#define LODESTONE_LEVELCHUNK_H
46 getBlock(
const int localX,
const int blockY,
const int localZ)
const override;
63 std::vector<std::unique_ptr<section::Section>>
m_sections;
Wraps a block with runtime-modifiable properties.
Definition BlockInstance.h:19
Holds chunks.
Definition ChunkContainer.h:17
Chunk()
Definition Chunk.cpp:11
section::Section * getSectionCreate(const coords::SectionCoordinates §ionY) override
Gets/Creates a section at the given section relative y level (NOT BLOCK Y).
Definition LevelChunk.cpp:46
section::Section * getSection(const coords::SectionCoordinates §ionY) const override
Creates a section at the given section relative y level (NOT BLOCK Y).
Definition LevelChunk.cpp:38
void setBlockRaw(block::instance::BlockInstance &&block, int localX, int y, int localZ) override
Sets a block at the given X, Y, and Z coordinates.
Definition LevelChunk.cpp:109
ChunkType type() override
Definition LevelChunk.cpp:25
const block::instance::BlockInstance & getBlock(const int localX, const int blockY, const int localZ) const override
Definition LevelChunk.cpp:53
void calculateHeightmapAtColumn(int localX, int localZ, int startHeight) override
Definition LevelChunk.cpp:67
bool hasSection(const coords::SectionCoordinates §ionY) const
Checks if a section at the given section relative y level exists (NOT BLOCK Y).
Definition LevelChunk.cpp:31
LevelChunk(int height)
Creates a new LevelChunk with preallocated chunk section array for the given height.
Definition LevelChunk.cpp:11
int getSectionCount() const override
Definition LevelChunk.cpp:114
void setBlock(block::instance::BlockInstance &&block, int localX, int y, int localZ) override
Sets a block at the given X, Y, and Z coordinates.
Definition LevelChunk.cpp:78
int getChunkHeight() const override
Gets the height of the chunk in Sections, can be used for getting section count.
Definition LevelChunk.cpp:29
void calculateHeightmap() override
Definition LevelChunk.cpp:57
std::vector< std::unique_ptr< section::Section > > m_sections
Chunk Sections.
Definition LevelChunk.h:63
Definition ChunkCoordinates.h:16
Definition SectionCoordinates.h:15
ChunkType
Definition Chunk.h:23
Definition ItemContainer.cpp:6
Definition ChunkCoordinates.cpp:10