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;
78 MCAPI
void _createBlockLightStorage();
80 MCAPI
void _createSkyLightStorage();
82 MCAPI
void _resetLight(
bool maxSkyLight,
bool maxLight);
84 MCAPI
void _setBlock(uchar layer, ushort index,
::Block const& block);
86 MCAPI
void deserialize(
90 ::std::optional<::DeserializationChanges*> deserializationChanges
93 MCAPI
void fetchBlocks(
96 short dimensionMinHeight,
100 MCAPI
bool isUniform(
::Block const& block)
const;
102 MCAPI ::SubChunk& operator=(
::SubChunk&& rhs);
104 MCAPI
void prune(::SubChunkStorageUnit::PruneType pruneType);
106 MCAPI ::std::string recalculateHashAndSerialize(
bool network);
108 MCAPI
void reset(
::Block const* resetBlock,
bool maxSkyLight,
bool fullyLit);
112 MCAPI
void setBlocksToUniform(
::Block const& initBlock,
bool maxSkyLight,
bool fullyLit);
114 MCAPI
void setFromBlockVolume(
::BlockVolume const& box,
short height);
116 MCAPI
void setSkyLight(ushort index, uchar lightValue);
124 MCAPI
static void flushGarbageCollectors();
131 $ctor(
::Block const* initBlock,
bool maxSkyLight,
bool fullyLit,
::SpinLockImpl& spinLock, schar absoluteIndex);