35 enum class SubChunkState :
int {
38 IsLightingSystemSubChunk = 1,
40 ReceivedResponseFromServer = 3,
41 ProcessingSubChunk = 4,
42 WaitingForCacheResponse = 5,
43 ProcessedSubChunk = 6,
50 ::ll::TypedStorage<4, 8, ::DirtyTicksCounter> mDirtyTicksCounter;
51 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mSkyLight;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mBlockLight;
53 ::ll::TypedStorage<1, 1, bool> mHasMaxSkyLight;
54 ::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mSubChunkState;
55 ::ll::TypedStorage<1, 1, bool> mNeedsInitLighting;
56 ::ll::TypedStorage<1, 1, bool> mNeedsClientLighting;
57 ::ll::TypedStorage<8, 16, ::std::unique_ptr<::SubChunkStorage<::Block>>[2]> mBlocks;
58 ::ll::TypedStorage<8, 16, ::SubChunkStorage<::Block>* [2]> mBlocksReadPtr;
59 ::ll::TypedStorage<8, 8, ::SpinLockImpl*> mWriteLock;
60 ::ll::TypedStorage<8, 8, uint64> mHash;
61 ::ll::TypedStorage<1, 1, bool> mHashDirty;
62 ::ll::TypedStorage<1, 1, char> mAbsoluteIndex;
63 ::ll::TypedStorage<1, 1, bool> mIsReplacementSubChunk;
64 ::ll::TypedStorage<1, 1, uchar> mRenderChunkTrackingVersionNumber;
79 MCAPI
void _createBlockLightStorage();
81 MCAPI
void _createSkyLightStorage();
83 MCAPI
void _resetLight(
bool maxSkyLight,
bool maxLight);
85 MCAPI
void _setBlock(uchar layer, ushort index,
::Block const& block);
87 MCAPI
void deserialize(
91 ::std::optional<::DeserializationChanges*> deserializationChanges
94 MCAPI
void fetchBlocks(
97 short dimensionMinHeight,
101 MCAPI
bool isUniform(
::Block const& block)
const;
103 MCAPI ::SubChunk& operator=(
::SubChunk&& rhs);
105 MCAPI
void prune(::SubChunkStorageUnit::PruneType pruneType);
107 MCAPI ::std::string recalculateHashAndSerialize(
bool network);
109 MCAPI
void reset(
::Block const* resetBlock,
bool maxSkyLight,
bool fullyLit);
113 MCAPI
void setBlocksToUniform(
::Block const& initBlock,
bool maxSkyLight,
bool fullyLit);
115 MCAPI
void setFromBlockVolume(
::BlockVolume const& box,
short height);
117 MCAPI
void setSkyLight(ushort index, uchar lightValue);
125 MCAPI
static void flushGarbageCollectors();
132 $ctor(
::Block const* initBlock,
bool maxSkyLight,
bool fullyLit,
::SpinLockImpl& spinLock, schar absoluteIndex);