Lodestone.Level
Loading...
Searching...
No Matches
lodestone::level::chunk::section::ImmutableSection Class Reference

Immutable section, used in place of returning empty/null LevelSection. More...

#include <ImmutableSection.h>

Inheritance diagram for lodestone::level::chunk::section::ImmutableSection:
Collaboration diagram for lodestone::level::chunk::section::ImmutableSection:

Public Member Functions

SectionType type () override
uint64_t getModificationCount () override
const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > & getBlockStorage () override
const block::instance::BlockInstance & getBlock (const int localX, const int localY, const int localZ) const override
void setBlock (block::instance::BlockInstance &&block, int localX, int localY, int localZ) override
lodestone::common::storage::bits::AbstractBitStorage * getBlockLightStorage () override
lodestone::common::storage::bits::AbstractBitStorage * getSkyLightStorage () override
void setBlockLight (int localX, int localY, int localZ, uint8_t lightLevel) override
void setSkyLight (int localX, int localY, int localZ, uint8_t lightLevel) override
Public Member Functions inherited from lodestone::common::util::IHasDerivedTypes< SectionType >
constexpr IHasDerivedTypes ()=default
virtual constexpr ~IHasDerivedTypes ()=default
bool constexpr instanceOf (EType type)

Static Public Member Functions

static ImmutableSection * getInstance ()

Static Private Attributes

static const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > EMPTY_BLOCK_STORAGE = common::storage::palette::PalletizedStorage<block::instance::BlockInstance>(0, *block::instance::ImmutableBlockInstance::getInstance())

Additional Inherited Members

Static Public Attributes inherited from lodestone::level::chunk::section::Section
static constexpr int TOTAL_SECTION_3D_SIZE = common::constants::CHUNK_WIDTH * common::constants::SECTION_HEIGHT * common::constants::CHUNK_DEPTH
static constexpr int TOTAL_SECTION_2D_SIZE = common::constants::CHUNK_WIDTH * common::constants::CHUNK_DEPTH

Detailed Description

Immutable section, used in place of returning empty/null LevelSection.

Member Function Documentation

◆ getBlock()

const block::instance::BlockInstance & lodestone::level::chunk::section::ImmutableSection::getBlock ( const int localX,
const int localY,
const int localZ ) const
overridevirtual

Implements lodestone::level::chunk::section::Section.

37 {
39 }
static ImmutableBlockInstance * getInstance()
Definition ImmutableBlockInstance.cpp:10

◆ getBlockLightStorage()

lodestone::common::storage::bits::AbstractBitStorage * lodestone::level::chunk::section::ImmutableSection::getBlockLightStorage ( )
overridevirtual

◆ getBlockStorage()

const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > & lodestone::level::chunk::section::ImmutableSection::getBlockStorage ( )
overridevirtual

Implements lodestone::level::chunk::section::Section.

20 {
22 }
static const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > EMPTY_BLOCK_STORAGE
Definition ImmutableSection.h:16

◆ getInstance()

ImmutableSection * lodestone::level::chunk::section::ImmutableSection::getInstance ( )
static
11 {
12 static ImmutableSection s_instance;
13 return &s_instance;
14 }

◆ getModificationCount()

uint64_t lodestone::level::chunk::section::ImmutableSection::getModificationCount ( )
overridevirtual

Implements lodestone::level::chunk::section::Section.

43 {
44 return 0;
45 }

◆ getSkyLightStorage()

lodestone::common::storage::bits::AbstractBitStorage * lodestone::level::chunk::section::ImmutableSection::getSkyLightStorage ( )
overridevirtual

◆ setBlock()

void lodestone::level::chunk::section::ImmutableSection::setBlock ( block::instance::BlockInstance && block,
int localX,
int localY,
int localZ )
overridevirtual

◆ setBlockLight()

void lodestone::level::chunk::section::ImmutableSection::setBlockLight ( int localX,
int localY,
int localZ,
uint8_t lightLevel )
overridevirtual

◆ setSkyLight()

void lodestone::level::chunk::section::ImmutableSection::setSkyLight ( int localX,
int localY,
int localZ,
uint8_t lightLevel )
overridevirtual

◆ type()

SectionType lodestone::level::chunk::section::ImmutableSection::type ( )
overridevirtual

Member Data Documentation

◆ EMPTY_BLOCK_STORAGE


The documentation for this class was generated from the following files: