29 enum class BlockLayer : uchar {
35 enum class SubChunkState :
int {
38 IsLightingSystemSubChunk = 1,
40 ReceivedResponseFromServer = 3,
41 ProcessingSubChunk = 4,
42 WaitingForCacheResponse = 5,
43 ProcessedSubChunk = 6,
52 ::ll::TypedStorage<4, 8, ::DirtyTicksCounter> mDirtyTicksCounter;
53 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mSkyLight;
54 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mBlockLight;
55 ::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mSubChunkState;
56 ::ll::TypedStorage<1, 1, bool> mHasMaxSkyLight;
57 ::ll::TypedStorage<1, 1, bool> mNeedsInitLighting;
58 ::ll::TypedStorage<1, 1, bool> mNeedsClientLighting;
59 ::ll::TypedStorage<8, 16, ::std::unique_ptr<::SubChunkStorage<::Block>>[2]> mBlocks;
60 ::ll::TypedStorage<8, 16, ::SubChunkStorage<::Block>* [2]> mBlocksReadPtr;
61 ::ll::TypedStorage<8, 24, ::SpinLockImpl> mWriteLock;
62 ::ll::TypedStorage<8, 8, uint64> mHash;
63 ::ll::TypedStorage<1, 1, bool> mHashDirty;
64 ::ll::TypedStorage<1, 1, schar> mAbsoluteIndex;
65 ::ll::TypedStorage<1, 1, bool> mIsReplacementSubChunk;
66 ::ll::TypedStorage<1, 1, uchar> mRenderChunkTrackingVersionNumber;
67 ::ll::TypedStorage<1, 1, bool> mIsInitialized;
71 [[nodiscard]]
bool isUniform(
::Block const& block)
const {
72 if (!mBlocksReadPtr[0]->isUniform(block)) {
76 if (mBlocksReadPtr[1] !=
nullptr) {
77 return mBlocksReadPtr[1]->isUniform(block);
84 SubChunk& operator=(SubChunk
const&);
85 SubChunk(SubChunk
const&);
93 MCNAPI
SubChunk(
::Block const* initBlock,
bool maxSkyLight,
bool maxLight, schar absoluteIndex);
96 MCNAPI
void _createBlockLightStorage();
98 MCNAPI
void _createSkyLightStorage();
102 MCNAPI
void _resetLight(
bool maxSkyLight,
bool maxLight);
111 ::std::optional<::DeserializationChanges*> deserializationChanges
117 short dimensionMinHeight,
121 MCNAPI
void initialize(
::Block const* initBlock,
bool maxSkyLight,
bool maxLight, schar absoluteIndex);
124 MCAPI
bool isPlaceHolderSubChunk()
const;
129 MCNAPI
void prune(::SubChunkStorageUnit::PruneType pruneType);
133 MCNAPI
void reset(
::Block const* resetBlock,
bool maxSkyLight,
bool fullyLit);
135 MCAPI
void serialize(
::IDataOutput& stream,
bool network)
const;
138 MCNAPI
void setBlockLight(ushort index, uchar lightValue);
154 MCNAPI
void setSkyLight(ushort index, uchar lightValue);
163 MCNAPI
void*
$ctor(::SubChunk&& rhs);
165 MCNAPI
void*
$ctor(
::Block const* initBlock,
bool maxSkyLight,
bool maxLight, schar absoluteIndex);