Lodestone.Level
Loading...
Searching...
No Matches
ImmutableSection.h
Go to the documentation of this file.
1//
2// Created by DexrnZacAttack on 10/14/25 using zPc-i2.
3//
4#ifndef LODESTONE_EMPTYSECTION_H
5#define LODESTONE_EMPTYSECTION_H
6
11
14 class ImmutableSection : public Section {
15 private:
17 public:
19
20 SectionType type() override;
21
22 uint64_t getModificationCount() override;
23
25
26 const block::instance::BlockInstance &getBlock(const int localX, const int localY, const int localZ) const override;
27 void setBlock(block::instance::BlockInstance &&block, int localX, int localY, int localZ) override;
28
31
32 void setBlockLight(int localX, int localY, int localZ, uint8_t lightLevel) override;
33 void setSkyLight(int localX, int localY, int localZ, uint8_t lightLevel) override;
34 };
35} // namespace lodestone::level::chunk::section
36
37#endif // LODESTONE_EMPTYSECTION_H
Wraps a block with runtime-modifiable properties.
Definition BlockInstance.h:19
Immutable section, used in place of returning empty/null LevelSection.
Definition ImmutableSection.h:14
static const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > EMPTY_BLOCK_STORAGE
Definition ImmutableSection.h:16
void setBlock(block::instance::BlockInstance &&block, int localX, int localY, int localZ) override
Definition ImmutableSection.cpp:41
static ImmutableSection * getInstance()
Definition ImmutableSection.cpp:11
lodestone::common::storage::bits::AbstractBitStorage * getBlockLightStorage() override
Definition ImmutableSection.cpp:24
void setBlockLight(int localX, int localY, int localZ, uint8_t lightLevel) override
Definition ImmutableSection.cpp:32
const block::instance::BlockInstance & getBlock(const int localX, const int localY, const int localZ) const override
Definition ImmutableSection.cpp:37
const common::storage::palette::PalletizedStorage< block::instance::BlockInstance > & getBlockStorage() override
Definition ImmutableSection.cpp:20
void setSkyLight(int localX, int localY, int localZ, uint8_t lightLevel) override
Definition ImmutableSection.cpp:34
SectionType type() override
Definition ImmutableSection.cpp:16
lodestone::common::storage::bits::AbstractBitStorage * getSkyLightStorage() override
Definition ImmutableSection.cpp:28
uint64_t getModificationCount() override
Definition ImmutableSection.cpp:43
Definition Block.cpp:6
Definition ImmutableSection.cpp:8
SectionType
Definition Section.h:19