28 enum class BlockLayer : uchar {
34 enum class SubChunkState :
int {
37 IsLightingSystemSubChunk = 1,
39 ReceivedResponseFromServer = 3,
40 ProcessingSubChunk = 4,
41 WaitingForCacheResponse = 5,
42 ProcessedSubChunk = 6,
51 ::ll::TypedStorage<4, 8, ::DirtyTicksCounter> mDirtyTicksCounter;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mSkyLight;
53 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkBrightnessStorage>> mBlockLight;
54 ::ll::TypedStorage<1, 1, bool> mHasMaxSkyLight;
55 ::ll::TypedStorage<4, 4, ::SubChunk::SubChunkState> mSubChunkState;
56 ::ll::TypedStorage<1, 1, bool> mNeedsInitLighting;
57 ::ll::TypedStorage<1, 1, bool> mNeedsClientLighting;
58 ::ll::TypedStorage<8, 16, ::std::unique_ptr<::SubChunkStorage<::Block>>[2]> mBlocks;
59 ::ll::TypedStorage<8, 16, ::SubChunkStorage<::Block>* [2]> mBlocksReadPtr;
60 ::ll::TypedStorage<8, 8, ::SpinLockImpl*> mWriteLock;
61 ::ll::TypedStorage<8, 8, uint64> mHash;
62 ::ll::TypedStorage<1, 1, bool> mHashDirty;
63 ::ll::TypedStorage<1, 1, schar> mAbsoluteIndex;
64 ::ll::TypedStorage<1, 1, bool> mIsReplacementSubChunk;
65 ::ll::TypedStorage<1, 1, uchar> mRenderChunkTrackingVersionNumber;
70 SubChunk& operator=(SubChunk
const&);
71 SubChunk(SubChunk
const&);
78 SubChunk(
::Block const* initBlock,
bool maxSkyLight,
bool fullyLit,
::SpinLockImpl& spinLock, schar absoluteIndex);
80 MCAPI
void _createBlockLightStorage();
82 MCAPI
void _createSkyLightStorage();
84 MCAPI
void _resetLight(
bool maxSkyLight,
bool maxLight);
86 MCAPI
void _setBlock(uchar layer, ushort index,
::Block const& block);
88 MCAPI
void deserialize(
92 ::std::optional<::DeserializationChanges*> deserializationChanges
95 MCAPI
void fetchBlocks(
98 short dimensionMinHeight,
102 MCAPI_C ::SubChunkBrightnessStorage::LightPair getLight(ushort idx)
const;
104 MCAPI_C
bool isPlaceHolderSubChunk()
const;
106 MCAPI
bool isUniform(
::Block const& block)
const;
108 MCAPI ::SubChunk& operator=(::SubChunk&& rhs);
110 MCAPI
void prune(::SubChunkStorageUnit::PruneType pruneType);
112 MCAPI ::std::string recalculateHashAndSerialize(
bool network);
114 MCAPI
void reset(
::Block const* resetBlock,
bool maxSkyLight,
bool fullyLit);
116 MCAPI
void serialize(
::IDataOutput& stream,
bool network)
const;
118 MCAPI
void setBlocksToUniform(
::Block const& initBlock,
bool maxSkyLight,
bool fullyLit);
120 MCAPI
void setFromBlockVolume(
::BlockVolume const& box,
short height);
122 MCAPI
void setSkyLight(ushort index, uchar lightValue);
130 MCAPI
static void flushGarbageCollectors();
137 $ctor(
::Block const* initBlock,
bool maxSkyLight,
bool fullyLit,
::SpinLockImpl& spinLock, schar absoluteIndex);