LeviLamina
Loading...
Searching...
No Matches
LevelChunk.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/small_vector.h"
7#include "mc/deps/core/utility/buffer_span.h"
8#include "mc/deps/game_refs/WeakRef.h"
9#include "mc/network/packet/SubChunkPacket.h"
10#include "mc/platform/threading/Mutex.h"
11#include "mc/platform/threading/SpinLockImpl.h"
12#include "mc/world/actor/ActorType.h"
13#include "mc/world/level/BlockPos.h"
14#include "mc/world/level/ChunkLocalHeight.h"
15#include "mc/world/level/ChunkPos.h"
16#include "mc/world/level/Tick.h"
17#include "mc/world/level/biome/BiomeIdType.h"
18#include "mc/world/level/block/BrightnessPair.h"
19#include "mc/world/level/chunk/ChunkCachedDataState.h"
20#include "mc/world/level/chunk/ChunkDebugDisplaySavedState.h"
21#include "mc/world/level/chunk/ChunkState.h"
22#include "mc/world/level/chunk/ChunkTerrainDataState.h"
23#include "mc/world/level/chunk/ColumnCachedData.h"
24#include "mc/world/level/chunk/DirtyTicksCounter.h"
25#include "mc/world/level/chunk/LevelChunkBiomes.h"
26#include "mc/world/level/chunk/LevelChunkBlockActorStorage.h"
27#include "mc/world/level/chunk/LevelChunkFormat.h"
28#include "mc/world/level/chunk/LevelChunkNeighbor.h"
29#include "mc/world/level/chunk/LevelChunkVolumeData.h"
30#include "mc/world/level/chunk/SubChunkInitMode.h"
31#include "mc/world/level/chunk/SubChunkStorage.h"
32#include "mc/world/level/chunk/level_chunk_ticking/Entity.h"
33#include "mc/world/level/levelgen/ChunkGenContext.h"
34#include "mc/world/level/levelgen/structure/BoundingBox.h"
35#include "mc/world/level/levelgen/v1/HardcodedSpawnAreaType.h"
36
37// auto generated forward declare list
38// clang-format off
39class AABB;
40class Actor;
41class Biome;
42class BiomeRegistry;
43class Block;
44class BlockActor;
46class BlockSource;
48class BlockVolume;
49class ChunkBlockPos;
50class ChunkSource;
51class ChunkViewSource;
52class Dimension;
53class EntityContext;
55class IDataInput;
56class IDataOutput;
57class ILevel;
59class SaveContext;
60class StringByteInput;
61class SubChunkPos;
62class WeakEntityRef;
64struct ActorLink;
65struct BiomeChunkState;
66struct BlockID;
69struct NibblePair;
70struct SubChunk;
71namespace Bedrock { class LevelChunkTimings; }
72namespace LevelChunkTicking { struct Registry; }
73// clang-format on
74
75class LevelChunk {
76public:
77 // LevelChunk inner types declare
78 // clang-format off
79 class Neighbors;
80 struct SpawningArea;
81 struct Telemetry;
82 // clang-format on
83
84 // LevelChunk inner types define
85 enum class DeserializeEntityResult : int {
86 FailedToLoadActor = 0,
87 FailedToAddToLevel = 1,
88 Succeeded = 2,
89 };
90
91 enum class Finalization : int {
92 NeedsInstaticking = 0,
93 NeedsPopulation = 1,
94 Done = 2,
95 };
96
97 class Neighbors {
98 public:
99 // member variables
100 // NOLINTBEGIN
101 ::ll::TypedStorage<1, 1, uchar> mNeighbors;
102 // NOLINTEND
103
104 public:
105 // static variables
106 // NOLINTBEGIN
107 MCAPI static ::std::array<::std::pair<::LevelChunkNeighbor, ::ChunkPos>, 8> const& sOffsetMap();
108 // NOLINTEND
109 };
110
112 public:
113 // member variables
114 // NOLINTBEGIN
115 ::ll::TypedStorage<4, 24, ::BoundingBox> aabb;
116 ::ll::TypedStorage<1, 1, ::HardcodedSpawnAreaType> type;
117 // NOLINTEND
118 };
119
120 struct Telemetry {
121 public:
122 // member variables
123 // NOLINTBEGIN
124 ::ll::TypedStorage<1, 1, bool> mWasStored;
125 ::ll::TypedStorage<1, 1, bool> mWasGenerated;
126 ::ll::TypedStorage<1, 1, bool> mWasRequestedInsideTickRange;
127 ::ll::TypedStorage<1, 1, bool> mWasLoadedInsideTickRange;
128 // NOLINTEND
129 };
130
131 using BBorder = bool;
132
134
135 using BlockActorVector = ::std::vector<::std::shared_ptr<::BlockActor>>;
136
137public:
138 // member variables
139 // NOLINTBEGIN
140 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mBlockEntityAccessLock;
141 ::ll::TypedStorage<8, 8, ::ILevel&> mLevel;
142 ::ll::TypedStorage<8, 8, ::Dimension&> mDimension;
143 ::ll::TypedStorage<4, 12, ::BlockPos> mMin;
144 ::ll::TypedStorage<4, 12, ::BlockPos> mMax;
145 ::ll::TypedStorage<8, 8, ::ChunkPos> mPosition;
146 ::ll::TypedStorage<1, 1, bool> mLightingFixupDone;
147 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mLightingTaskActive;
148 ::ll::TypedStorage<1, 1, bool> mReadOnly;
149 ::ll::TypedStorage<8, 8, ::ChunkSource*> mGenerator;
150 ::ll::TypedStorage<4, 4, ::LevelChunkTicking::Entity> mTmpTickingEntity;
151 ::ll::TypedStorage<1, 2, ::std::optional<::LevelChunkFormat>> mLoadedFormat;
152 ::ll::TypedStorage<1, 1, bool> mHadSerializedEntities;
153 ::ll::TypedStorage<8, 32, ::std::string> mSerializedEntitiesBuffer;
154 ::ll::TypedStorage<8, 32, ::std::string> mFailedSerializedEntitiesBuffer;
155 ::ll::TypedStorage<8, 24, ::std::vector<::ActorLink>> mUnresolvedActorLinks;
156 ::ll::TypedStorage<1, 1, ::std::atomic<::ChunkState>> mLoadState;
157 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mIsCurrentLoadStateIndeterminate;
158 ::ll::TypedStorage<1, 1, ::ChunkTerrainDataState> mTerrainDataState;
159 ::ll::TypedStorage<1, 1, ::ChunkDebugDisplaySavedState> mDebugDisplaySavedState;
160 ::ll::TypedStorage<1, 1, ::ChunkCachedDataState> mCachedDataState;
161 ::ll::TypedStorage<8, 24, ::SpinLockImpl> mCachedDataStateSpinLock;
162 ::ll::TypedStorage<8, 24, ::SpinLockImpl> mClientRequestHeightmapAdjustSpinLock;
163 ::ll::TypedStorage<8, 8, ::Tick> mLastTick;
164 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTickingQueue>> mTickQueue;
165 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTickingQueue>> mRandomTickQueue;
166 ::ll::TypedStorage<8, 24, ::std::vector<::SubChunk>> mSubChunks;
167 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SpinLockImpl>>> mSubChunkSpinLocks;
168 ::ll::TypedStorage<8, 552, ::LevelChunkBiomes> mBiomes;
169 ::ll::TypedStorage<4, 2048, ::std::array<::ColumnCachedData, 256>> mCachedData;
170 ::ll::TypedStorage<2, 512, ::std::array<::ChunkLocalHeight, 256>> mHeightmap;
171 ::ll::TypedStorage<2, 512, ::std::array<::ChunkLocalHeight, 256>> mRenderHeightmap;
172 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::std::vector<short>>> mPreWorldGenHeightmap;
173 ::ll::TypedStorage<2, 2, ::ChunkLocalHeight> mNonAirMaxHeight;
174 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BiomeIdType, ::BiomeChunkState>> mBiomeStates;
175 ::ll::TypedStorage<1, 1, bool> mHasCachedTemperatureNoise;
176 ::ll::TypedStorage<1, 256, ::std::array<bool, 256>> mBorderBlockMap;
177 ::ll::TypedStorage<1, 1, bool> mIsRedstoneLoaded;
178 ::ll::TypedStorage<1, 1, bool> mOwnedByTickingThread;
179 ::ll::TypedStorage<1, 1, bool> mUse3DBiomeMaps;
180 ::ll::TypedStorage<1, 1, bool> mLevelChunkHas3dBiomeTag;
181 ::ll::TypedStorage<4, 4, int> mCurrentInstatick;
182 ::ll::TypedStorage<4, 4, ::LevelChunk::Finalization> mFinalized;
183 ::ll::TypedStorage<1, 4, ::LevelChunk::Telemetry> mTelemetry;
184 ::ll::TypedStorage<8, 64, ::ChunkGenContext> mChunkGenContext;
185 ::ll::TypedStorage<4, 48, ::DirtyTicksCounter[6]> mFullChunkDirtyTicksCounters;
186 ::ll::TypedStorage<4, 8, ::DirtyTicksCounter> mChunkActorsDirtyTicksCounter;
187 ::ll::TypedStorage<2, 512, ::std::array<::ChunkLocalHeight, 256>> mRainHeights;
188 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mEntities;
189 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mRemovedActorStorageKeys;
190 ::ll::TypedStorage<8, 184, ::LevelChunkBlockActorStorage> mBlockEntities;
191 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::BlockActor>>> mPreservedBlockEntities;
192 ::ll::TypedStorage<8, 24, ::std::vector<::WeakRef<::EntityContext>>> mVolumes;
193 ::ll::TypedStorage<1, 2, ::BrightnessPair> mDefaultBrightness;
194 ::ll::TypedStorage<8, 24, ::std::vector<::LevelChunk::SpawningArea>> mSpawningAreas;
195 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastNetworkLightingTime;
196 ::ll::TypedStorage<8, 8, uint64> mLoadedMetaDataHash;
197 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelChunkMetaData>> mMetaData;
198 ::ll::TypedStorage<4, 16, float[2][2]> mChunkInterpolants;
199 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mGenerationSeed;
200 ::ll::TypedStorage<1, 1, bool> mbChunkHasConverterTag;
201 ::ll::TypedStorage<1, 1, ::LevelChunk::Neighbors> mSavedNeighbors;
202 ::ll::TypedStorage<1, 1, bool> mClientNeedsToRequestSubChunks;
203 ::ll::TypedStorage<1, 1, bool> mLevelChunkHasHadOriginalLighting;
204 ::ll::TypedStorage<1, 1, bool> mGeneratedPreCavesAndCliffsBlending;
205 ::ll::TypedStorage<1, 1, bool> mOnChunkLoadedCalled;
206 ::ll::TypedStorage<1, 1, bool> mAllSerializedEntitiesLoaded;
207 ::ll::TypedStorage<8, 32, ::std::string> mOutOfBoundsBlockEntitiesBuffer;
208 ::ll::TypedStorage<1, 1, bool> mSaveNonActorDataIfDirty;
209 ::ll::TypedStorage<1, 1, bool> mSaveIfNeverSaved;
210 ::ll::TypedStorage<1, 1, bool> mHasSubChunksToPrune;
211 ::ll::TypedStorage<1, 1, bool> mHaveSubChunksBeenPruned;
212 ::ll::TypedStorage<1, 1, bool> mShouldShiftUpFlatWorldSubChunks;
213 ::ll::TypedStorage<8, 24, ::SpinLockImpl> mSubChunksToPruneLock;
214 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::std::vector<::SubChunk>>> mSubChunksToPruneOutsideRange;
215 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::Bedrock::LevelChunkTimings>>> mChunkTimings;
216 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameEventListenerRegistry>> mGameEventListenerRegistry;
217 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mSnowRandomValue;
218 ::ll::TypedStorage<1, 1, bool> mIsClientGenerated;
219 ::ll::TypedStorage<1, 1, bool> mWasClientGenerated;
220 ::ll::TypedStorage<1, 1, bool> mIsEmptyClientChunk;
221 ::ll::TypedStorage<1, 1, bool> mActorStorageUpdatedAfterCheckingForReplacementData;
222 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mIsTransient;
223 ::ll::TypedStorage<8, 856, ::LevelChunkVolumeData> mLevelChunkVolumeData;
224 // NOLINTEND
225
226public:
227 // prevent constructor by default
228 LevelChunk& operator=(LevelChunk const&);
229 LevelChunk(LevelChunk const&);
230 LevelChunk();
231
232public:
233 // member functions
234 // NOLINTBEGIN
235 MCAPI LevelChunk(
236 ::Dimension& dimension,
237 ::ChunkPos const& cp,
238 bool readOnly,
239 ::SubChunkInitMode initBlocks,
240 bool initializeMetaData,
241 ::LevelChunkBlockActorStorage::TrackingMode blockActorTrackingMode
242 );
243
244 MCAPI void _addEntityToVolumes(::gsl::not_null<::Actor*> actor);
245
246 MCAPI void _checkAndInferMetaDataAfterDeserialization();
247
248#ifdef LL_PLAT_C
249 MCAPI void _deserializeBiomes(::IDataInput& stream, ::BiomeRegistry const& biomeRegistry, bool fromNetwork);
250#endif
251
252#ifdef LL_PLAT_S
253 MCAPI void _deserializeBiomes(::IDataInput& stream, ::BiomeRegistry const& biomeRegistry, bool fromNetwork);
254#endif
255
256 MCAPI void _deserializeBlockEntities(::IDataInput& stream, ::LevelChunkBlockActorStorage& blockEntityMap);
257
258 MCAPI bool _deserializeSubChunk(short index, ::StringByteInput& stream);
259
260 MCAPI void _fixupCorruptedBlockActors(
261 ::LevelChunkBlockActorStorage& deserialized,
263 ) const;
264
265 MCAPI void _lightingCallbacks(
266 ::ChunkBlockPos const& pos,
267 ::Block const& old,
268 ::Block const& current,
269 ::BlockSource* currentSource
270 );
271
272 MCAPI void _placeBlockEntity(::std::shared_ptr<::BlockActor> te);
273
274 MCAPI bool _recalcHeight(::ChunkBlockPos const& start, ::BlockSource* source);
275
276 MCAPI void _set2DBiomesFrom3D(::IDataInput& stream);
277
278 MCAPI void _setAllBiomesFrom2D(::std::array<::BiomeIdType, 256>& legacyBiomes);
279
280 MCAPI void _setBiome(::Biome const& biome, ::ChunkBlockPos const& pos, bool fillYDimension);
281
282 MCAPI void addEntity(::WeakEntityRef entityRef);
283
284 MCAPI void addHardcodedSpawningArea(::BoundingBox const& spawnerAABB, ::HardcodedSpawnAreaType type);
285
286 MCAPI bool applySeasonsPostProcess(::BlockSource& region);
287
288 MCAPI bool checkSeasonsPostProcessDirty() const;
289
290#ifdef LL_PLAT_C
291 MCAPI void clearBlockEntitiesInSubChunk(
292 schar absoluteIndex,
293 ::LevelChunkBlockActorStorage const* blockActorMap,
294 ::BlockSource* region
295 );
296
297 MCAPI void clientSubChunkRequestGenerateLightingForSubChunk(::ChunkViewSource& neighborhood, short absoluteIndex);
298
299 MCAPI void deserializeBiomes(::IDataInput& stream, bool fromNetwork);
300#endif
301
302 MCAPI void deserializeBlockEntities(::IDataInput& stream);
303
304 MCAPI bool deserializeKey(::std::string_view key, ::std::string_view value);
305
306 MCAPI void deserializeMetaDataHash(::IDataInput& stream);
307
308#ifdef LL_PLAT_C
309 MCAPI void deserializeSubChunk(
310 ::IDataInput& stream,
311 short absoluteIndex,
312 ::std::optional<::DeserializationChanges*> deserializationChanges
313 );
314#endif
315
316 MCAPI void deserializeSubChunk(
317 uchar idx,
318 ::IDataInput& stream,
319 ::std::optional<schar> absoluteIndex,
320 ::std::optional<::DeserializationChanges*> deserializationChanges
321 );
322
323 MCAPI void fetchBlocks(::BlockPos const& volumeOrigin, ::BlockVolume& volume) const;
324
325 MCAPI void finalizeDeserialization();
326
327 MCAPI void finalizePostProcessing();
328
329 MCAPI void finalizeSubChunkDeserialization(
330 ::LevelChunkBlockActorStorage& blockActorMap,
332 );
333
334 MCAPI bool generateOriginalLighting(::ChunkViewSource& neighborhood, bool enforceBorderCheck);
335
336 MCAPI ::ChunkLocalHeight getAboveTopSolidBlock(
337 ::ChunkBlockPos const& start,
338 bool iteratePastInitialBlocking,
339 bool includeWater,
340 bool includeLeaves
341 ) const;
342
343 MCAPI void getActors(
344 ::ActorDefinitionIdentifier const& actorDefinitionId,
345 ::AABB const& bb,
346 ::std::vector<::Actor*>& actors
347 ) const;
348
349 MCAPI ::Biome const& getBiome(::ChunkBlockPos const& pos) const;
350
351 MCAPI ::Block const& getBlock(::ChunkBlockPos const& pos) const;
352
353 MCAPI ::BlockActor* getBlockEntity(::ChunkBlockPos const& localPos);
354
355#ifdef LL_PLAT_C
356 MCAPI ::std::array<::ChunkLocalHeight, 256> getEntireLightingHeightMap() const;
357#endif
358
359 MCAPI void getEntities(
360 ::gsl::span<::gsl::not_null<::Actor const*>> ignoredEntities,
361 ::AABB const& bb,
362 ::std::vector<::Actor*>& entities,
363 bool useHitbox
364 ) const;
365
366 MCAPI void
367 getEntities(::ActorType type, ::AABB const& bb, ::std::vector<::Actor*>& es, bool ignoreTargetType) const;
368
369 MCAPI short getMaxAllocatedY() const;
370
371 MCAPI ::std::shared_ptr<::LevelChunkMetaData> getMetaDataCopy() const;
372
373#ifdef LL_PLAT_C
374 MCAPI ::SubChunk* getSubChunk(short absoluteIndex);
375#endif
376
377 MCAPI int getSubChunkCountUpToHighestNonAirBlock() const;
378
379 MCAPI ::BlockPos const getTopRainBlockPos(::ChunkBlockPos const& pos);
380
381#ifdef LL_PLAT_C
382 MCAPI void handleHeightmapDataFromSubChunkPacket(
383 short subChunkAbsoluteIndex,
384 ::SubChunkPacket::SubChunkPacketData const& subChunkPacketData,
385 ::std::optional<::DeserializationChanges*> deserializationChanges
386 );
387#endif
388
389 MCAPI void markForTickingThisFrame(::LevelChunkTicking::Registry& registry);
390
391#ifdef LL_PLAT_C
392 MCAPI void moveLevelChunk(::LevelChunk&& otherChunk, uint64 subChunkRequestLimit);
393#endif
394
395 MCAPI bool nonActorDataNeedsSaving(int wait, int maxWait) const;
396
397 MCAPI void onDiscarded();
398
399 MCAPI ::LevelChunk& operator=(::LevelChunk&& otherChunk);
400
401 MCAPI void placeCallbacks(
402 ::ChunkBlockPos const& pos,
403 ::Block const& old,
404 ::Block const& current,
405 ::BlockSource* currentSource,
406 ::std::shared_ptr<::BlockActor> blockEntity,
407 ::BlockChangeContext const& changeSourceContext
408 );
409
410 MCAPI void pruneBiomesAboveHeightmap();
411
412#ifdef LL_PLAT_C
413 MCAPI void recalculateChunkSkyLight();
414#endif
415
416 MCAPI void recomputeHeightMap(bool resetLighting);
417
418 MCAPI ::std::shared_ptr<::BlockActor> removeBlockEntity(::BlockPos const& blockPos);
419
420 MCAPI bool removeEntityFromChunk(::WeakEntityRef entityRef);
421
422 MCAPI bool removeEntityFromWorld(::WeakEntityRef entityRef);
423
424 MCAPI void removeHardcodedSpawningArea(::HardcodedSpawnAreaType type);
425
426 MCAPI void serializeBlockEntities(::IDataOutput& stream, ::SaveContext const& saveContext) const;
427
428 MCAPI void serializeBlockEntitiesForSubChunk(
429 ::IDataOutput& stream,
430 ::SubChunkPos const& subChunkPos,
431 ::SaveContext const& saveContext
432 ) const;
433
434 MCAPI bool serializeBorderBlocks(::IDataOutput& stream) const;
435
436 MCAPI void serializeEntities(
437 ::std::string& buffer,
438 bool markProcessedOnChunkDisard,
439 ::std::function<void(::std::string const&)> addLiveActorCallback,
440 ::std::function<void(::std::string const&)> addActorKeyCallback,
441 ::std::function<void(::std::string const&)> addSerializedActor
442 ) const;
443
444 MCAPI void serializeEntityRemovals(::std::function<void(::std::string const&)> callback);
445
446 MCAPI void serializeRandomTicks(::IDataOutput& stream) const;
447
448 MCAPI void serializeTicks(::IDataOutput& stream) const;
449
450 MCAPI void setAllBlockTypeIDAndData(::buffer_span<::BlockID> ids, ::buffer_span<::NibblePair> data);
451
452 MCAPI ::Block const& setBlock(
453 ::ChunkBlockPos const& pos,
454 ::Block const& block,
455 ::BlockSource* issuingSource,
456 ::std::shared_ptr<::BlockActor> blockEntity,
457 ::BlockChangeContext const& changeSourceContext
458 );
459
460 MCAPI void setBlockVolume(::BlockVolume const& box, uint yOffset);
461
462 MCAPI void setBorder(::ChunkBlockPos const& pos, bool val);
463
464#ifdef LL_PLAT_C
465 MCAPI void setClientNeedsToRequestSubchunks(::std::optional<uint64> requestLimit);
466#endif
467
468 MCAPI ::Block const&
469 setExtraBlock(::ChunkBlockPos const& localPos, ::Block const& block, ::BlockSource* issuingSource);
470
471 MCAPI void setExtraBlockSimple(::ChunkBlockPos const& pos, ::Block const& block);
472
473 MCAPI void setPendingEntities(::std::string entitiesData);
474
475 MCAPI void setPreWorldGenHeightMap(::std::unique_ptr<::std::vector<short>> heightmap);
476
477 MCAPI void tickBlockEntities(::BlockSource& tickRegion);
478
479 MCAPI void tickImpl(::BlockSource& tickRegion, ::Tick const& tick, ::std::function<void()> spawnerCallback);
480
481 MCAPI bool tryChangeState(::ChunkState from, ::ChunkState to);
482
483 MCAPI void validateAndFixBiomeStates();
484
485 MCAPI ~LevelChunk();
486 // NOLINTEND
487
488public:
489 // static functions
490 // NOLINTBEGIN
491#ifdef LL_PLAT_C
492 MCAPI static ::std::unique_ptr<::LevelChunk, ::LevelChunkPhase1Deleter> createNew(
493 ::Dimension& dimension,
494 ::ChunkPos cp,
495 bool readOnly,
496 ::SubChunkInitMode initBlocks,
497 ::LevelChunkBlockActorStorage::TrackingMode blockActorTrackingMode
498 );
499
500 MCAPI static ::std::unique_ptr<::LevelChunk>
501 createNewNoCustomDeleter(::Dimension& dimension, ::ChunkPos cp, bool readOnly, ::SubChunkInitMode initBlocks);
502#endif
503
504 MCAPI static ::std::pair<ushort, ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>> deserialize3DBiomes(
505 ::IDataInput& stream,
506 ::BiomeRegistry const& biomeRegistry,
507 ushort dimensionHeightInSubchunks,
508 ::Biome const* defaultBiome,
509 bool fromNetwork
510 );
511
512 MCAPI static ::std::optional<::BlockPos> findExposedLightningRod(::BlockPos const& pos, ::BlockSource& region);
513
514 MCAPI static ::std::
515 tuple<::std::array<::ChunkLocalHeight, 256>, ::std::array<::BiomeIdType, 256>, ::std::vector<::SubChunk>>
516 staticDeserializeLegacyTerrain(::IDataInput& stream, short minY, ushort dimensionSizeInSubchunks);
517 // NOLINTEND
518
519public:
520 // constructor thunks
521 // NOLINTBEGIN
522 MCAPI void* $ctor(
523 ::Dimension& dimension,
524 ::ChunkPos const& cp,
525 bool readOnly,
526 ::SubChunkInitMode initBlocks,
527 bool initializeMetaData,
528 ::LevelChunkBlockActorStorage::TrackingMode blockActorTrackingMode
529 );
530 // NOLINTEND
531
532public:
533 // destructor thunk
534 // NOLINTBEGIN
535 MCAPI void $dtor();
536 // NOLINTEND
537};
Definition AABB.h:18
Definition Actor.h:113
Definition LevelChunkTimings.h:16
Definition small_vector.h:8
Definition BiomeRegistry.h:35
Definition Biome.h:24
Definition BlockActor.h:27
Definition BlockChangeContext.h:10
Definition BlockPos.h:21
Definition BlockSource.h:71
Definition BlockTickingQueue.h:27
Definition BlockVolume.h:14
Definition Block.h:40
Definition BoundingBox.h:13
Definition ChunkBlockPos.h:10
Definition ChunkPos.h:10
Definition ChunkSource.h:38
Definition ChunkViewSource.h:22
Definition Dimension.h:86
Definition EntityContext.h:15
Definition GameEventListenerRegistry.h:10
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ILevel.h:220
Definition LevelChunkBlockActorStorage.h:16
Definition LevelChunkMetaData.h:8
Definition LevelChunk.h:97
Definition SaveContext.h:5
Definition StringByteInput.h:9
Definition SubChunkPos.h:5
Definition WeakEntityRef.h:14
Definition _HeaderOutputPredefine.h:337
Definition buffer_span.h:6
Definition ActorDefinitionIdentifier.h:15
Definition BiomeChunkState.h:5
Definition BlockID.h:8
Definition DeserializationChanges.h:14
Definition LevelChunkPhase1Deleter.h:5
Definition Registry.h:10
Definition LevelChunk.h:111
Definition LevelChunk.h:120
Definition NibblePair.h:5
Definition SubChunkPacket.h:73
Definition SubChunk.h:25
Definition Tick.h:5
Definition buffer.h:5