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/client/renderer/block/tessellation_pipeline/VolumeOf.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/UniqueLock.h"
11#include "mc/world/actor/ActorType.h"
12#include "mc/world/level/chunk/ChunkCachedDataState.h"
13#include "mc/world/level/chunk/ChunkDebugDisplaySavedState.h"
14#include "mc/world/level/chunk/ChunkState.h"
15#include "mc/world/level/chunk/ChunkTerrainDataState.h"
16#include "mc/world/level/chunk/LevelChunkFormat.h"
17#include "mc/world/level/chunk/LevelChunkNeighbor.h"
18#include "mc/world/level/chunk/SubChunkInitMode.h"
19#include "mc/world/level/chunk/SubChunkStorage.h"
20#include "mc/world/level/chunk/level_chunk_ticking/Entity.h"
21#include "mc/world/level/levelgen/v1/HardcodedSpawnAreaType.h"
22
23// auto generated forward declare list
24// clang-format off
25class AABB;
26class Actor;
27class Biome;
28class BiomeRegistry;
29class Block;
30class BlockActor;
31class BlockPos;
32class BlockSource;
34class BlockVolume;
35class BoundingBox;
36class ChunkBlockPos;
38class ChunkPos;
39class ChunkSource;
40class ChunkViewSource;
41class Dimension;
42class EntityContext;
44class IDataInput;
45class IDataOutput;
46class ILevel;
49class Random;
50class SaveContext;
51class SpinLockImpl;
52class StringByteInput;
53class SubChunkPos;
54class Vec3;
55class WeakEntityRef;
56class Weather;
58struct ActorLink;
59struct BiomeChunkData;
60struct BiomeChunkState;
61struct BlockID;
62struct BrightnessPair;
63struct ColumnCachedData;
66struct NibblePair;
67struct SubChunk;
68struct Tick;
69namespace Bedrock::Threading { class Mutex; }
70namespace LevelChunkTicking { struct Registry; }
71// clang-format on
72
74public:
75 // LevelChunk inner types declare
76 // clang-format off
77 class Neighbors;
78 struct SpawningArea;
79 struct Telemetry;
80 // clang-format on
81
82 // LevelChunk inner types define
83 enum class Finalization : int {
84 NeedsInstaticking = 0,
85 NeedsPopulation = 1,
86 Done = 2,
87 };
88
89 class Neighbors {
90 public:
91 // member variables
92 // NOLINTBEGIN
93 ::ll::TypedStorage<1, 1, uchar> mNeighbors;
94 // NOLINTEND
95
96 public:
97 // static variables
98 // NOLINTBEGIN
99 MCAPI static ::std::array<::std::pair<::LevelChunkNeighbor, ::ChunkPos>, 8> const& sOffsetMap();
100 // NOLINTEND
101 };
102
103 struct Telemetry {
104 public:
105 // member variables
106 // NOLINTBEGIN
107 ::ll::TypedStorage<1, 1, bool> mWasStored;
108 ::ll::TypedStorage<1, 1, bool> mWasGenerated;
109 ::ll::TypedStorage<1, 1, bool> mWasRequestedInsideTickRange;
110 ::ll::TypedStorage<1, 1, bool> mWasLoadedInsideTickRange;
111 // NOLINTEND
112 };
113
114 using BlockList = ::std::vector<::BlockPos>;
115
116 using OwnedBlockActorMap = ::std::unordered_map<::ChunkBlockPos, ::std::shared_ptr<::BlockActor>>;
117
118 using BlockActorVector = ::std::vector<::std::shared_ptr<::BlockActor>>;
119
121 public:
122 // member variables
123 // NOLINTBEGIN
124 ::ll::TypedStorage<4, 24, ::BoundingBox> aabb;
125 ::ll::TypedStorage<1, 1, ::HardcodedSpawnAreaType> type;
126 // NOLINTEND
127 };
128
129 using BBorder = bool;
130
131 enum class DeserializeEntityResult : int {
132 FailedToLoadActor = 0,
133 FailedToAddToLevel = 1,
134 Succeeded = 2,
135 };
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<8, 32, ::std::string> mSerializedEntitiesBuffer;
153 ::ll::TypedStorage<8, 32, ::std::string> mFailedSerializedEntitiesBuffer;
154 ::ll::TypedStorage<1, 1, bool> mHadSerializedEntities;
155 ::ll::TypedStorage<8, 24, ::std::vector<::ActorLink>> mUnresolvedActorLinks;
156 ::ll::TypedStorage<1, 1, ::std::atomic<::ChunkState>> mLoadState;
157 ::ll::TypedStorage<1, 1, ::ChunkTerrainDataState> mTerrainDataState;
158 ::ll::TypedStorage<1, 1, ::ChunkDebugDisplaySavedState> mDebugDisplaySavedState;
159 ::ll::TypedStorage<1, 1, ::ChunkCachedDataState> mCachedDataState;
160 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mCachedDataStateSpinLock;
161 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mClientRequestHeightmapAdjustSpinLock;
162 ::ll::TypedStorage<8, 8, ::Tick> mLastTick;
163 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTickingQueue>> mTickQueue;
164 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTickingQueue>> mRandomTickQueue;
165 ::ll::TypedStorage<8, 24, ::std::vector<::SubChunk>> mSubChunks;
166 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SpinLockImpl>>> mSubChunkSpinLocks;
167 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>> mBiomes;
168 ::ll::TypedStorage<2, 512, ::std::array<::BiomeChunkData, 256>> m2DBiomes;
169 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mBiomesMutex;
170 ::ll::TypedStorage<4, 2048, ::std::array<::ColumnCachedData, 256>> mCachedData;
171 ::ll::TypedStorage<2, 512, ::std::array<::ChunkLocalHeight, 256>> mHeightmap;
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<ushort, ::BiomeChunkState>> mBiomeStates;
175 ::ll::TypedStorage<2, 2, ushort> m3dBiomeStackSize;
176 ::ll::TypedStorage<1, 1, bool> mHasCachedTemperatureNoise;
177 ::ll::TypedStorage<1, 256, ::std::array<bool, 256>> mBorderBlockMap;
178 ::ll::TypedStorage<4, 4, int> mCurrentInstatick;
179 ::ll::TypedStorage<4, 4, ::LevelChunk::Finalization> mFinalized;
180 ::ll::TypedStorage<1, 1, bool> mIsRedstoneLoaded;
181 ::ll::TypedStorage<1, 1, bool> mOwnedByTickingThread;
182 ::ll::TypedStorage<1, 1, bool> mUse3DBiomeMaps;
183 ::ll::TypedStorage<1, 1, bool> mLevelChunkHas3dBiomeTag;
184 ::ll::TypedStorage<1, 4, ::LevelChunk::Telemetry> mTelemetry;
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, 64, ::std::unordered_map<::ChunkBlockPos, ::std::shared_ptr<::BlockActor>>> 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<1, 1, bool> mClientNeedsToRequestSubChunks;
199 ::ll::TypedStorage<1, 1, bool> mLevelChunkHasHadOriginalLighting;
200 ::ll::TypedStorage<4, 16, float[2][2]> mChunkInterpolants;
201 ::ll::TypedStorage<1, 1, bool> mbChunkHasConverterTag;
202 ::ll::TypedStorage<1, 1, ::LevelChunk::Neighbors> mSavedNeighbors;
203 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mGenerationSeed;
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> mOutOfBoundsEntitiesBuffer;
208 ::ll::TypedStorage<8, 32, ::std::string> mOutOfBoundsBlockEntitiesBuffer;
209 ::ll::TypedStorage<1, 1, bool> mSaveNonActorDataIfDirty;
210 ::ll::TypedStorage<1, 1, bool> mSaveIfNeverSaved;
211 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mSnowRandomValue;
212 ::ll::TypedStorage<1, 1, bool> mHasSubChunksToPrune;
213 ::ll::TypedStorage<1, 1, bool> mHaveSubChunksBeenPruned;
214 ::ll::TypedStorage<1, 1, bool> mShouldShiftUpFlatWorldSubChunks;
215 ::ll::TypedStorage<8, 32, ::SpinLockImpl> mSubChunksToPruneLock;
216 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::std::vector<::SubChunk>>> mSubChunksToPruneOutsideRange;
217 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::GameEventListenerRegistry>> mGameEventListenerRegistry;
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<8, 856, ::LevelChunkVolumeData> mLevelChunkVolumeData;
223 // NOLINTEND
224
225public:
226 // prevent constructor by default
227 LevelChunk& operator=(LevelChunk const&);
228 LevelChunk(LevelChunk const&);
229
230public:
231 // member functions
232 // NOLINTBEGIN
233 MCAPI LevelChunk(
234 ::Dimension& dimension,
235 ::ChunkPos const& cp,
236 bool readOnly,
237 ::SubChunkInitMode initBlocks,
238 bool initializeMetaData
239 );
240
241 MCAPI void _addEntityToVolumes(::gsl::not_null<::Actor*> actor);
242
243 MCAPI void _checkAndInferMetaDataAfterDeserialization();
244
245 MCAPI ::std::shared_ptr<::BlockActor> _createBlockEntity(
246 ::BlockPos const& block,
247 ::BlockSource* currentSource,
248 ::Block const& current,
249 ::Block const& old
250 );
251
252 MCAPI void _deserializeBiomes(::IDataInput& stream, ::BiomeRegistry const& biomeRegistry, bool fromNetwork);
253
254 MCAPI void _deserializeBlockEntities(
255 ::IDataInput& stream,
256 ::std::unordered_map<::ChunkBlockPos, ::std::shared_ptr<::BlockActor>>& blockEntityMap
257 );
258
259 MCAPI void _deserializeCCsubChunks(short index, ::StringByteInput& stream);
260
261 MCAPI ::LevelChunk::DeserializeEntityResult
262 _deserializeEntity(::BlockSource& source, ::IDataInput& stream, ::std::vector<::ActorLink>& links);
263
264 MCAPI bool _deserializeSubChunk(short index, ::StringByteInput& stream);
265
266 MCAPI void _fixupCommandBlocksOnTickingQueue(::BlockSource& tickRegion);
267
268 MCAPI void _fixupCorruptedBlockActors(
269 ::std::unordered_map<::ChunkBlockPos, ::std::shared_ptr<::BlockActor>>& deserialized,
271 );
272
273 MCAPI void _generateOriginalLighting(::ChunkViewSource& neighborhood, bool enforceBorderCheck);
274
275 MCAPI void _generateOriginalLightingSubChunk(::BlockSource& source, uint64 subchunkIdx, bool);
276
277 MCAPI void _lightingCallbacks(
278 ::ChunkBlockPos const& pos,
279 ::Block const& old,
280 ::Block const& current,
281 ::BlockSource* currentSource
282 );
283
284 MCAPI void _makeUniformBiomes(::Biome const& biome);
285
286 MCAPI void _placeBlockEntity(::std::shared_ptr<::BlockActor> te);
287
288 MCAPI bool _recalcHeight(::ChunkBlockPos const& start, ::BlockSource* source);
289
290 MCAPI void _removeCallbacks(
291 ::ChunkBlockPos const& pos,
292 ::Block const& oldBlock,
293 ::Block const& current,
294 ::BlockSource* currentSource
295 );
296
297 MCAPI void _replaceBiomeStorage(
298 ushort biomeIndex,
299 ::std::unique_ptr<::SubChunkStorage<::Biome>> newStorage,
301 );
302
303 MCAPI void _set2DBiomesFrom3D(::IDataInput& stream);
304
305 MCAPI void _setAllBiomesFrom2D(::std::array<::BiomeChunkData, 256>& legacyBiomes);
306
307 MCAPI void _setBiome(::Biome const& biome, ::ChunkBlockPos const& pos, bool fillYDimension);
308
309 MCAPI void _setBiome(
310 ::Biome const& biome,
311 ushort biomeIndex,
312 ushort storageIndex,
314 );
315
316 MCAPI void _tickSnowAndIce(::BlockSource& region, ::Random& random, int xOffset, int zOffset, ::Weather& weather);
317
318 MCAPI void addEntity(::WeakEntityRef entityRef);
319
320 MCAPI void addHardcodedSpawningArea(::BoundingBox const& spawnerAABB, ::HardcodedSpawnAreaType type);
321
322 MCAPI void addSubChunkBlockEntitiesToLevelChunk(
323 ::std::unordered_map<::ChunkBlockPos, ::std::shared_ptr<::BlockActor>>& blockActorMap
324 );
325
326 MCAPI bool applySeasonsPostProcess(::BlockSource& region);
327
328 MCAPI bool checkSeasonsPostProcessDirty();
329
330 MCAPI void clientSubChunkRequestGenerateLightingForSubChunk(::ChunkViewSource& neighborhood, short absoluteIndex);
331
332 MCAPI void deserialize2DMaps(::IDataInput& stream);
333
334 MCAPI void deserialize2DMapsLegacy(::IDataInput& stream);
335
336 MCAPI void deserializeBiomeStates(::IDataInput& stream);
337
338 MCAPI void deserializeBlockEntities(::IDataInput& stream);
339
340 MCAPI void deserializeConversionData(::IDataInput& stream);
341
342 MCAPI void deserializeFinalization(::IDataInput& stream);
343
344 MCAPI bool deserializeKey(::std::string_view key, ::std::string_view value);
345
346 MCAPI void deserializeLoadedVersion(::IDataInput& stream);
347
348 MCAPI void deserializeMetaDataHash(::IDataInput& stream);
349
350 MCAPI void deserializeSubChunk(
351 uchar idx,
352 ::IDataInput& stream,
353 ::std::optional<schar> absoluteIndex,
354 ::std::optional<::DeserializationChanges*> deserializationChanges
355 );
356
357 MCAPI void fillBiomes(::BiomeChunkData const& biomeChunkData);
358
359 MCAPI void finalizeDeserialization();
360
361 MCAPI void finalizePostProcessing();
362
363 MCAPI ::std::optional<::BlockPos> findExposedLightningRod(::BlockPos const& pos, ::BlockSource& region);
364
365 MCAPI ::Vec3 findLightningTarget(::BlockPos const& pos, ::BlockSource& region);
366
367 MCAPI bool generateOriginalLighting(::ChunkViewSource& neighborhood, bool enforceBorderCheck);
368
369 MCAPI ::ChunkLocalHeight getAboveTopSolidBlock(
370 ::ChunkBlockPos const& start,
371 bool iteratePastInitialBlocking,
372 bool includeWater,
373 bool includeLeaves
374 ) const;
375
376 MCAPI void
377 getActors(::ActorDefinitionIdentifier const& actorDefinitionId, ::AABB const& bb, ::std::vector<::Actor*>& actors)
378 const;
379
380 MCAPI ::Biome const& getBiome(::ChunkBlockPos const& pos) const;
381
382 MCAPI ::Block const& getBlock(::ChunkBlockPos const& pos) const;
383
384 MCAPI ::BrightnessPair getBrightness(::ChunkBlockPos const& pos) const;
385
386 MCAPI schar getCachedTemperatureNoise(::ChunkBlockPos const& pos);
387
388 MCAPI void getEntities(
389 ::gsl::span<::gsl::not_null<::Actor const*>> ignoredEntities,
390 ::AABB const& bb,
391 ::std::vector<::Actor*>& entities,
392 bool useHitbox
393 ) const;
394
395 MCAPI void
396 getEntities(::ActorType type, ::AABB const& bb, ::std::vector<::Actor*>& es, bool ignoreTargetType) const;
397
398 MCAPI ::Block const& getExtraBlock(::ChunkBlockPos const& localPos) const;
399
400 MCAPI short getHighestNonAirSubChunkIndex() const;
401
402 MCAPI ::std::shared_ptr<::LevelChunkMetaData> getMetaDataCopy() const;
403
404 MCAPI ::BlockPos const getTopRainBlockPos(::ChunkBlockPos const& pos);
405
406 MCAPI bool hasEntity(::WeakEntityRef entityRef);
407
408 MCAPI bool isNonActorDataDirty() const;
409
410 MCAPI void legacyDeserializeBlockExtraData(::IDataInput& stream);
411
412 MCAPI void legacyDeserializeTerrain(::IDataInput& stream);
413
414 MCAPI void markForTickingThisFrame(::LevelChunkTicking::Registry& registry);
415
416 MCAPI ::LevelChunk& operator=(::LevelChunk&& otherChunk);
417
418 MCAPI void placeCallbacks(
419 ::ChunkBlockPos const& pos,
420 ::Block const& old,
421 ::Block const& current,
422 ::BlockSource* currentSource,
423 ::std::shared_ptr<::BlockActor> blockEntity
424 );
425
426 MCAPI void populateHeightMapDataForSubChunkPacket(
427 short subChunkAbsoluteIndex,
428 ::SubChunkPacket::SubChunkPacketData& subChunkPacketData
429 ) const;
430
431 MCAPI void recomputeHeightMap(bool resetLighting);
432
433 MCAPI ::std::shared_ptr<::BlockActor> removeBlockEntity(::BlockPos const& blockPos);
434
435 MCAPI bool removeEntityFromChunk(::WeakEntityRef entityRef);
436
437 MCAPI bool removeEntityFromWorld(::WeakEntityRef entityRef);
438
439 MCAPI void removeHardcodedSpawningArea(::HardcodedSpawnAreaType type);
440
441 MCAPI void serializeBiomes(::IDataOutput& stream) const;
442
443 MCAPI void serializeBlockEntities(::IDataOutput& stream, ::SaveContext const& saveContext) const;
444
445 MCAPI void serializeBlockEntitiesForSubChunk(
446 ::IDataOutput& stream,
447 ::SubChunkPos const& subChunkPos,
448 ::SaveContext const& saveContext
449 ) const;
450
451 MCAPI bool serializeBorderBlocks(::IDataOutput& stream) const;
452
453 MCAPI void serializeEntities(
454 ::std::string& buffer,
455 bool markProcessedOnChunkDisard,
456 ::std::function<void(::std::string const&)> addLiveActorCallback,
457 ::std::function<void(::std::string const&)> addActorKeyCallback,
458 ::std::function<void(::std::string const&)> addSerializedActor
459 ) const;
460
461 MCAPI void serializeEntityRemovals(::std::function<void(::std::string const&)> callback);
462
463 MCAPI void setAllLegacyBlockIDAndData(::buffer_span<::BlockID> ids, ::buffer_span<::NibblePair> data);
464
465 MCAPI void setBiomeFromVolume(::ClientBlockPipeline::VolumeOf<::Biome const*> const& volume, uint yOffset);
466
467 MCAPI ::Block const& setBlock(
468 ::ChunkBlockPos const& pos,
469 ::Block const& block,
470 ::BlockSource* issuingSource,
471 ::std::shared_ptr<::BlockActor> blockEntity
472 );
473
474 MCAPI void setBlockVolume(::BlockVolume const& box, uint yOffset);
475
476 MCAPI void setBorder(::ChunkBlockPos const& pos, bool val);
477
478 MCAPI ::Block const&
479 setExtraBlock(::ChunkBlockPos const& localPos, ::Block const& block, ::BlockSource* issuingSource);
480
481 MCAPI void setMetaData(::std::shared_ptr<::LevelChunkMetaData> metaData);
482
483 MCAPI void setPendingEntities(::std::string entitiesData);
484
485 MCAPI void setPreWorldGenHeightMap(::std::unique_ptr<::std::vector<short>> heightmap);
486
487 MCAPI void setSaved();
488
489 MCAPI void setUnsaved();
490
491 MCAPI void setupRedstoneCircuit(::BlockSource& resource);
492
493 MCAPI void tickBlockEntities(::BlockSource& tickRegion);
494
495 MCAPI void tickBlocks(::BlockSource& region);
496
497 MCAPI void tickImpl(::BlockSource& tickRegion, ::Tick const& tick, ::std::function<void()> spawnerCallback);
498
499 MCAPI void trySpawnSkeletonTrap(::BlockSource& region, ::BlockPos const& pos);
500
501 MCAPI void validateAndFixBiomeStates();
502
503 MCAPI ~LevelChunk();
504 // NOLINTEND
505
506public:
507 // static functions
508 // NOLINTBEGIN
509 MCAPI static ::std::array<::BiomeChunkData, 256> _deserialize2DBiomesWithDataUpgrade(
510 ::IDataInput& stream,
511 ::std::optional<::LevelChunkFormat> const& lcFormat,
512 bool isClientSide
513 );
514
515 MCAPI static ::std::pair<ushort, ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>> deserialize3DBiomes(
516 ::IDataInput& stream,
517 ::BiomeRegistry const& biomeRegistry,
518 ushort dimensionHeightInSubchunks,
519 ::Biome const* defaultBiome,
520 bool fromNetwork
521 );
522
523 MCAPI static ::std::tuple<
524 ::std::array<::ChunkLocalHeight, 256>,
525 ushort,
526 ::std::vector<::std::unique_ptr<::SubChunkStorage<::Biome>>>>
527 deserialize3DData(
528 ::IDataInput& stream,
529 ::BiomeRegistry const& biomeRegistry,
530 ushort dimensionHeightInSubchunks,
531 ::Biome* defaultBiomes
532 );
533
534 MCAPI static void serializeEntities(
535 ::std::vector<::WeakEntityRef> const& entities,
536 ::std::string const& serializedEntitiesBuffer,
537 ::std::string const& failedSerializedEntitiesBuffer,
538 ::std::string& buffer,
539 bool markProcessedOnChunkDisard,
540 ::std::function<void(::std::string const&)> addLiveActorCallback,
541 ::std::function<void(::std::string const&)> addActorKeyCallback,
542 ::std::function<void(::std::string const&)> addSerializedActor
543 );
544 // NOLINTEND
545
546public:
547 // constructor thunks
548 // NOLINTBEGIN
549 MCAPI void* $ctor(
550 ::Dimension& dimension,
551 ::ChunkPos const& cp,
552 bool readOnly,
553 ::SubChunkInitMode initBlocks,
554 bool initializeMetaData
555 );
556 // NOLINTEND
557
558public:
559 // destructor thunk
560 // NOLINTBEGIN
561 MCAPI void $dtor();
562 // NOLINTEND
563};
Definition AABB.h:16
Definition Actor.h:104
Definition UniqueLock.h:8
Definition BiomeRegistry.h:30
Definition Biome.h:27
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BlockTickingQueue.h:24
Definition BlockVolume.h:11
Definition Block.h:36
Definition BoundingBox.h:18
Definition ChunkBlockPos.h:11
Definition ChunkLocalHeight.h:5
Definition ChunkPos.h:11
Definition ChunkSource.h:34
Definition ChunkViewSource.h:22
Definition VolumeOf.h:8
Definition Dimension.h:83
Definition EntityContext.h:16
Definition GameEventListenerRegistry.h:10
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ILevel.h:203
Definition LevelChunkMetaData.h:10
Definition LevelChunkVolumeData.h:16
Definition LevelChunk.h:89
Definition LevelChunk.h:73
Definition Random.h:16
Definition SaveContext.h:5
Definition SpinLockImpl.h:5
Definition StringByteInput.h:9
Definition SubChunkPos.h:5
Definition SubChunkStorage.h:9
Definition Vec3.h:10
Definition WeakEntityRef.h:14
Definition Weather.h:17
Definition _HeaderOutputPredefine.h:179
Definition buffer_span.h:6
Definition ActorDefinitionIdentifier.h:13
Definition BiomeChunkData.h:5
Definition BiomeChunkState.h:5
Definition BlockID.h:8
Definition BrightnessPair.h:10
Definition ColumnCachedData.h:5
Definition DeserializationChanges.h:5
Definition DirtyTicksCounter.h:5
Definition Registry.h:10
Definition LevelChunk.h:120
Definition LevelChunk.h:103
Definition NibblePair.h:5
Definition SubChunkPacket.h:73
Definition SubChunk.h:24
Definition Tick.h:5
Definition buffer.h:5