LeviLamina
Loading...
Searching...
No Matches
Dimension.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/Brightness.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/deps/game_refs/EnableGetWeakRef.h"
9#include "mc/deps/game_refs/OwnerPtr.h"
10#include "mc/deps/game_refs/WeakRef.h"
11#include "mc/legacy/ActorUniqueID.h"
12#include "mc/platform/brstd/function_ref.h"
13#include "mc/world/level/BlockChangedEventTarget.h"
14#include "mc/world/level/ChunkPos.h"
15#include "mc/world/level/LevelListener.h"
16#include "mc/world/level/SubChunkPos.h"
17#include "mc/world/level/block/BrightnessPair.h"
18#include "mc/world/level/chunk/ChunkKey.h"
19#include "mc/world/level/chunk/LevelChunkGarbageCollector.h"
20#include "mc/world/level/dimension/ActorReplication.h"
21#include "mc/world/level/dimension/DimensionHeightRange.h"
22#include "mc/world/level/dimension/DimensionIdType.h"
23#include "mc/world/level/dimension/DimensionType.h"
24#include "mc/world/level/dimension/DirectionalLightSource.h"
25#include "mc/world/level/dimension/IDimension.h"
26#include "mc/world/level/dimension/LimboEntitiesVersion.h"
27#include "mc/world/level/levelgen/v1/FeatureTerrainAdjustments.h"
28#include "mc/world/level/levelgen/v2/providers/IntProvider.h"
29#include "mc/world/level/saveddata/SavedData.h"
30#include "mc/world/level/storage/StorageVersion.h"
31
32// auto generated forward declare list
33// clang-format off
34class Actor;
35class BiomeRegistry;
36class Block;
38class BlockPos;
39class BlockSource;
42class ChunkSource;
43class CircuitSystem;
44class CompoundTag;
45class DelayActionList;
47class EntityContext;
49class ILevel;
51class Level;
52class LevelChunk;
55class Packet;
56class Player;
59class Seasons;
61class TaskGroup;
62class TickingAreaList;
63class Vec3;
64class VillageManager;
65class WeakEntityRef;
66class Weather;
67class WorldGenerator;
71struct BiomeIdType;
76namespace Poi { class Manager; }
77namespace br::worldgen { class StructureSetRegistry; }
78namespace mce { class Color; }
82// clang-format on
83
84class Dimension : public ::IDimension,
85 public ::LevelListener,
86 public ::SavedData,
88 public ::EnableGetWeakRef<::Dimension>,
89 public ::std::enable_shared_from_this<::Dimension> {
90public:
91 // Dimension inner types declare
92 // clang-format off
95 // clang-format on
96
97 // Dimension inner types define
99 public:
100 // member variables
101 // NOLINTBEGIN
102 ::ll::TypedStorage<4, 4, float> mMinFlashDuration;
103 ::ll::TypedStorage<4, 4, float> mMaxFlashDuration;
104 ::ll::TypedStorage<4, 4, float> mMinFlashCooldown;
105 ::ll::TypedStorage<4, 4, float> mMaxFlashCooldown;
106 // NOLINTEND
107 };
108
110 public:
111 // member variables
112 // NOLINTBEGIN
113 ::ll::TypedStorage<4, 4, float> mAngle;
114 ::ll::TypedStorage<4, 4, float> mPerpendicularAngle;
115 ::ll::TypedStorage<4, 4, float> mIntensityMultiplier;
116 ::ll::TypedStorage<4, 4, ::DirectionalLightSource> mLightSource;
117 // NOLINTEND
118 };
119
120 using ActorTagList = ::std::vector<::std::unique_ptr<::CompoundTag>>;
121
122 using ChunkPosToActorListMap = ::std::unordered_map<::ChunkPos, ::std::vector<::std::unique_ptr<::CompoundTag>>>;
123
124 using DirectionalLightControls = ::std::variant<::Dimension::ChaoticDirectionalLightControls>;
125
126public:
127 // member variables
128 // NOLINTBEGIN
129 ::ll::TypedStorage<8, 24, ::std::vector<::ActorChunkTransferEntry>> mActorChunkTransferQueue;
130 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkKey, ::std::vector<::ActorUnloadedChunkTransferEntry>>>
131 mActorUnloadedChunkTransferQueue;
132 ::ll::TypedStorage<8, 8, ::ILevel&> mLevel;
133 ::ll::TypedStorage<2, 4, ::DimensionHeightRange> mHeightRange;
134 ::ll::TypedStorage<2, 2, short> mSeaLevel;
135 ::ll::TypedStorage<1, 1, uchar> mMonsterSpawnBlockLightLimit;
136 ::ll::TypedStorage<8, 32, ::IntProvider> mMonsterSpawnLightTest;
137 ::ll::TypedStorage<8, 16, ::OwnerPtr<::BlockSource>> mBlockSource;
138 ::ll::TypedStorage<1, 1, bool> mHasWeather;
139 ::ll::TypedStorage<4, 28, float[7]> mMobsPerChunkSurface;
140 ::ll::TypedStorage<4, 28, float[7]> mMobsPerChunkUnderground;
141 ::ll::TypedStorage<1, 2, ::BrightnessPair> mDefaultBrightness;
142 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DimensionBrightnessRamp>> mDimensionBrightnessRamp;
143 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelChunkMetaData>> mTargetMetaData;
144 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RuntimeLightingManager>> mRuntimeLightingManager;
145 ::ll::TypedStorage<8, 32, ::std::string> mName;
146 ::ll::TypedStorage<8, 32, ::std::string> mTypeId;
147 ::ll::TypedStorage<4, 4, ::DimensionType> mId;
148 ::ll::TypedStorage<2, 2, ::DimensionIdType const> mRegistryId;
149 ::ll::TypedStorage<1, 1, bool> mUltraWarm;
150 ::ll::TypedStorage<1, 1, bool> mHasCeiling;
151 ::ll::TypedStorage<1, 1, bool> mHasSkylight;
152 ::ll::TypedStorage<1, 1, ::Brightness> mSkyDarken;
153 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockEventDispatcher>> mDispatcher;
154 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
155 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mChunkGenTaskGroup;
156 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PostprocessingManager>> mPostProcessingManager;
157 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkInterlocker>> mSubChunkInterlocker;
158 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkSource>> mChunkSource;
159 ::ll::TypedStorage<8, 8, ::WorldGenerator*> mWorldGenerator;
160 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Weather>> mWeather;
161 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Seasons>> mSeasons;
162 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameEventDispatcher>> mGameEventDispatcher;
163 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CircuitSystem>> mCircuitSystem;
164 ::ll::TypedStorage<4, 4, int const> CIRCUIT_TICK_RATE;
165 ::ll::TypedStorage<4, 4, int> mCircuitSystemTickRate;
166 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ActorUniqueID, ::WeakEntityRef>> mActorIDEntityIDMap;
167 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mDisplayEntities;
168 ::ll::TypedStorage<8, 72, ::FeatureTerrainAdjustments> mFeatureTerrainAdjustments;
169 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::vector<::std::unique_ptr<::CompoundTag>>>>
170 mLimboEntities;
171 ::ll::TypedStorage<8, 16, ::std::set<::ActorUniqueID>> mEntitiesToMoveChunks;
172 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::TickingAreaList>> mTickingAreaList;
173 ::ll::TypedStorage<8, 632, ::LevelChunkGarbageCollector> mLevelChunkGarbageCollector;
174 ::ll::TypedStorage<8, 16, ::std::set<::ActorUniqueID>> mWitherIDs;
175 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelChunkBuilderData>> mLevelChunkBuilderData;
176 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPruneTime;
177 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastStructurePruneTime;
178 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkBuildOrderPolicyBase>> mChunkBuildOrderPolicy;
179 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::VillageManager>> mVillageManager;
180 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Poi::Manager>> mPoiManager;
181 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkIdentifierWithSubId>> mTemporaryPlayerIds;
182 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkLoadActionList>> mChunkLoadActionList;
183 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DelayActionList>> mDelayActionList;
184 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SubChunkPos, ::UpdateSubChunkBlocksChangedInfo>>
185 mBlocksChangedBySubChunkMap;
186 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IClientDimensionExtensions>> mClientExtensions;
187 ::ll::TypedStorage<8, 112, ::ActorReplication> mActorReplication;
188 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mPlayersToReplicate;
189 ::ll::TypedStorage<1, 1, bool> mRunChunkGenWatchDog;
190 // NOLINTEND
191
192public:
193 // prevent constructor by default
194 Dimension& operator=(Dimension const&);
195 Dimension(Dimension const&);
196 Dimension();
197
198public:
199 // virtual functions
200 // NOLINTBEGIN
201 virtual ~Dimension() /*override*/;
202
203 virtual void init(::br::worldgen::StructureSetRegistry const& structureSetRegistry);
204
205 virtual void tick();
206
207 virtual void tickRedstone();
208
209 virtual ::std::unique_ptr<::WorldGenerator>
210 createGenerator(::br::worldgen::StructureSetRegistry const& structureSetRegistry) = 0;
211
212 virtual void upgradeLevelChunk(::ChunkSource& source, ::LevelChunk& lc, ::LevelChunk& generatedChunk) = 0;
213
214 virtual void fixWallChunk(::ChunkSource& source, ::LevelChunk& lc) = 0;
215
216 virtual void initializeWithLevelStorageManagerConnector(
217 ::ILevelStorageManagerConnector& levelStorageManagerConnector
218 ) /*override*/;
219
220 virtual bool levelChunkNeedsUpgrade(::LevelChunk const& lc) const = 0;
221
222 virtual bool isNaturalDimension() const /*override*/;
223
224 virtual bool isValidSpawn(int, int) const;
225
226 virtual ::mce::Color getBrightnessDependentFogColor(::mce::Color const& baseColor, float brightness) const;
227
228 virtual short getCloudHeight() const;
229
230 virtual ::BiomeIdType getDefaultBiomeId() const;
231
232 virtual bool mayRespawnViaBed() const;
233
234 virtual ::BlockPos getSpawnPos() const;
235
236 virtual int getSpawnYPosition() const;
237
238 virtual bool showSky() const;
239
240 virtual float getTimeOfDay(int time, float a) const;
241
242 virtual void setDimensionDirectionalLightControls(
243 ::std::variant<::Dimension::ChaoticDirectionalLightControls> const& directionalLightControls
244 );
245
246 virtual ::Dimension::DirectionalLightState getDimensionDirectionalLightSourceState(float a) const;
247
248 virtual ::DimensionType getDimensionId() const /*override*/;
249
250 virtual void forEachPlayer(::brstd::function_ref<bool(::Player&)> callback) const /*override*/;
251
252 virtual ::BiomeRegistry& getBiomeRegistry() /*override*/;
253
254 virtual ::BiomeRegistry const& getBiomeRegistry() const /*override*/;
255
256 virtual ::BlockSource& getBlockSourceFromMainChunkSource() const /*override*/;
257
258 virtual ::Actor* fetchEntity(::ActorUniqueID actorID, bool getRemoved) const /*override*/;
259
260 virtual void onChunkLoaded(::ChunkSource& source, ::LevelChunk& lc) /*override*/;
261
262 virtual void deserialize(::CompoundTag const& tag) /*override*/;
263
264 virtual void serialize(::CompoundTag& tag) const /*override*/;
265
266 virtual void sendBroadcast(::Packet const& packet, ::Player* except);
267
268 virtual bool is2DPositionRelevantForPlayer(::BlockPos const& position, ::Player& player) const;
269
270 virtual void buildPlayersForPositionPacket(
271 ::BlockPos const& position,
272 ::Player const* except,
273 ::std::vector<::NetworkIdentifierWithSubId>& result
274 ) const /*override*/;
275
276 virtual void
277 sendPacketForPosition(::BlockPos const& position, ::Packet const& packet, ::Player const* except) /*override*/;
278
279 virtual void sendPacketForEntity(::Actor const& actor, ::Packet const& packet, ::Player const* except) /*override*/;
280
281 virtual bool isActorRelevantForPlayer(::Player& player, ::Actor const& actor) const;
282
283 virtual void onBlockEvent(::BlockSource& source, int x, int y, int z, int b0, int b1) /*override*/;
284
285 virtual void onBlockChanged(
286 ::BlockSource& source,
287 ::BlockPos const& pos,
288 uint layer,
289 ::Block const& block,
290 ::Block const& oldBlock,
291 int updateFlags,
292 ::ActorBlockSyncMessage const* syncMsg,
293 ::BlockChangedEventTarget eventTarget,
294 ::Actor* blockChangeSource
295 ) /*override*/;
296
297 virtual void onLevelDestruction(::std::string const&) /*override*/;
298
299 virtual ::DimensionBrightnessRamp const& getBrightnessRamp() const;
300
301 virtual ::std::vector<::std::string> const getStructuresFromChunkRegistry(::Vec3 const& location) const;
302
303 virtual ::std::optional<::std::string> const getStructureFromStructureRegistry(::Vec3 const& location) const;
304
305 virtual void startLeaveGame();
306
307 virtual void flushLevelChunkGarbageCollector() /*override*/;
308
309 virtual void updatePoiBlockStateChange(::BlockPos, ::Block const&, ::Block const&) const /*override*/;
310
311 virtual ::std::unique_ptr<::ChunkBuildOrderPolicyBase> _createChunkBuildOrderPolicy();
312
313 virtual void _upgradeOldLimboEntity(::CompoundTag& tag, ::LimboEntitiesVersion vers) = 0;
314
315 virtual ::std::unique_ptr<::ChunkSource> _wrapStorageForVersionCompatibility(
316 ::std::unique_ptr<::ChunkSource> storageSource,
317 ::StorageVersion levelVersion
318 ) = 0;
319 // NOLINTEND
320
321public:
322 // member functions
323 // NOLINTBEGIN
324 MCAPI explicit Dimension(::DimensionArguments&& args);
325
326 MCAPI void _addActorUnloadedChunkTransferToQueue(
327 ::ChunkPos const& fromChunkPos,
328 ::ChunkPos const& toChunkPos,
329 ::DimensionType dimId,
330 ::std::string& actorStorageKey,
331 ::std::unique_ptr<::CompoundTag> entityTag
332 );
333
334 MCAPI void _completeEntityTransfer(::OwnerPtr<::EntityContext> entity);
335
336 MCAPI ::BlockSource _createFixupBlockSource(::ChunkSource& source);
337
338 MCAPI void _processEntityChunkTransfers();
339
340 MCAPI void _runChunkGenerationWatchdog();
341
342 MCAPI void _sendBlockEntityUpdatePacket(::BlockPos const& pos);
343
344 MCAPI void _sendBlocksChangedPackets();
345
346 MCAPI void _sendUpdateBlockPacket(::UpdateSubChunkNetworkBlockInfo const& info, uint const& layer);
347
348 MCAPI void _tickEntityChunkMoves();
349
350 MCAPI void addPlayerToReplication(::WeakEntityRef const& player);
351
352 MCAPI void addWither(::ActorUniqueID const& id);
353
354 MCAPI void clearPlayerReplicationList();
355
356 MCAPI float distanceToNearestPlayerSqr2D(::Vec3 origin);
357
358 MCAPI ::Player* fetchAnyInteractablePlayer(::Vec3 const& searchPos, float maxDist) const;
359
360 MCAPI ::Player* fetchNearestAttackablePlayer(::Actor& source, float maxDist) const;
361
362 MCAPI ::Player* fetchNearestAttackablePlayer(::BlockPos source, float maxDist, ::Actor* sourceActor) const;
363
364 MCAPI ::Player* fetchNearestInteractablePlayer(::Vec3 const& searchPos, float maxDist) const;
365
366 MCAPI ::Player* fetchNearestInteractablePlayer(::Actor& source, float maxDist) const;
367
368 MCAPI ::Player* fetchNearestPlayer(
369 ::Vec3 const& searchPos,
370 float maxDist,
371 bool isFetchAny,
372 ::brstd::function_ref<bool(::Player const&)> playerFilter
373 ) const;
374
375 MCAPI ::Player* findPlayer(::brstd::function_ref<bool(::Player const&)> pred) const;
376
377 MCAPI void flagEntityforChunkMove(::Actor& e);
378
379 MCAPI void flushRunTimeLighting();
380
381 MCFOLD ::BlockEventDispatcher& getBlockEventDispatcher();
382
383 MCFOLD ::ChunkBuildOrderPolicyBase& getChunkBuildOrderPolicy();
384
385 MCAPI ::gsl::not_null<::ChunkLoadActionList*> getChunkLoadActionList();
386
387 MCAPI ::ChunkSource& getChunkSource() const;
388
389 MCFOLD ::CircuitSystem& getCircuitSystem();
390
391 MCAPI ::gsl::not_null<::DelayActionList*> getDelayActionList();
392
393 MCFOLD ::std::vector<::WeakEntityRef>& getDisplayEntities();
394
395 MCFOLD ::std::unordered_map<::ActorUniqueID, ::WeakEntityRef>& getEntityIdMap();
396
397#ifdef LL_PLAT_C
398 MCFOLD ::std::unordered_map<::ActorUniqueID, ::WeakEntityRef> const& getEntityIdMapConst() const;
399#endif
400
401 MCFOLD ::FeatureTerrainAdjustments& getFeatureTerrainAdjustments();
402
403 MCAPI ::GameEventDispatcher* getGameEventDispatcher() const;
404
405 MCAPI short getHeight() const;
406
407 MCAPI ushort getHeightInSubchunks() const;
408
409 MCFOLD ::DimensionHeightRange const& getHeightRange() const;
410
411 MCFOLD ::Level& getLevel() const;
412
413 MCFOLD ::Level const& getLevelConst() const;
414
415 MCAPI ::std::string getLocalizationKey() const;
416
417 MCAPI short getMinHeight() const;
418
419 MCAPI uchar getMonsterSpawnBlockLightLimit() const;
420
421 MCAPI ::IntProvider getMonsterSpawnLightTest() const;
422
423 MCAPI float getMoonBrightness() const;
424
425 MCAPI int getMoonPhase() const;
426
427 MCAPI ::Brightness getOldSkyDarken(float a);
428
429 MCAPI float getPopCap(int catID, bool surface) const;
430
431 MCFOLD ::Seasons& getSeasons();
432
433#ifdef LL_PLAT_C
434 MCAPI float getSkyDarken(float a) const;
435#endif
436
437 MCAPI ::Brightness getSkyDarken() const;
438
439 MCAPI float getSunAngle(float a) const;
440
441 MCFOLD ::std::shared_ptr<::LevelChunkMetaData const> getTargetMetaData();
442
443 MCFOLD ::TickingAreaList& getTickingAreas();
444
445 MCFOLD ::TickingAreaList const& getTickingAreasConst() const;
446
447 MCAPI float getTimeOfDay(float a) const;
448
449 MCFOLD ::std::string const& getTypeId() const;
450
451 MCAPI ::std::unique_ptr<::VillageManager> const& getVillageManager() const;
452
453 MCAPI ::WeakRef<::Dimension> getWeakRef();
454
455 MCFOLD ::Weather& getWeather() const;
456
457 MCFOLD ::WorldGenerator* getWorldGenerator() const;
458
459#ifdef LL_PLAT_C
460 MCAPI bool hasAddedWither() const;
461#endif
462
463 MCAPI bool hasCeiling() const;
464
465 MCFOLD bool hasSkylight() const;
466
467 MCAPI bool isBrightOutside() const;
468
469 MCAPI bool isChunkKnown(::ChunkPos const& chunkPos) const;
470
471 MCAPI bool const isClientSideGenerationEnabled() const;
472
473 MCAPI bool isHeightWithinRange(short const& height) const;
474
475 MCAPI bool isLeaveGameDone();
476
477 MCAPI bool isMoonVisible() const;
478
479 MCAPI bool isRedstoneTick();
480
481 MCAPI bool isSubChunkHeightWithinRange(short const& subChunkHeight) const;
482
483 MCAPI bool isUltraWarm() const;
484
485 MCAPI void neighborAwareChunkUpgrade(::ChunkSource& source, ::LevelChunk& levelChunk);
486
487 MCAPI void onStaticTickingAreaAdded(::std::string const& tickingAreaName);
488
489 MCAPI void pauseAndFlushTaskGroups();
490
491 MCAPI void processPlayerReplication();
492
493#ifdef LL_PLAT_C
494 MCAPI void registerDisplayEntity(::WeakRef<::EntityContext> entityRef);
495#endif
496
497 MCAPI void registerEntity(::ActorUniqueID const& actorID, ::WeakRef<::EntityContext> entityRef);
498
499 MCAPI void removeActorByID(::ActorUniqueID const& id);
500
501 MCAPI void removeWither(::ActorUniqueID const& id);
502
503 MCAPI void sendPacketToClients(::Packet const& packet, ::std::vector<::NetworkIdentifierWithSubId> ids);
504
505 MCAPI void setCeiling(bool ceiling);
506
507#ifdef LL_PLAT_C
508 MCAPI void setRunChunkGenWatchDog(bool runWatchDog);
509#endif
510
511 MCAPI void setSkylight(bool skylight);
512
513 MCAPI void setUltraWarm(bool warm);
514
515#ifdef LL_PLAT_C
516 MCAPI void setWorldGenerator(::WorldGenerator* generator);
517#endif
518
519 MCAPI void
520 transferEntity(::ChunkPos const& fromChunkPos, ::Vec3 const& spawnPos, ::std::unique_ptr<::CompoundTag> entityTag);
521
522 MCAPI void transferEntityToUnloadedChunk(::Actor& actor, ::LevelChunk* fromChunk);
523
524 MCAPI void tryGarbageCollectStructures();
525
526 MCAPI void tryLoadLimboEntities(::ChunkPos const& loadPos);
527
528 MCAPI void unregisterDisplayEntity(::WeakRef<::EntityContext> entityRef);
529
530 MCAPI void unregisterEntity(::ActorUniqueID const& actorID);
531
532 MCAPI void updateBlockLight(
533 ::BlockPos const& blockPos,
534 ::Brightness oldBrightness,
535 ::Brightness newBrightness,
536 ::Brightness oldAbsorb,
537 ::Brightness newAbsorb,
538 bool isSunLight
539 );
540
541#ifdef LL_PLAT_C
542 MCAPI void visitExtensions(::brstd::function_ref<void(::ClientDimensionExtensions&)> visitor);
543#endif
544
545 MCAPI void visitStructureWireframe(::brstd::function_ref<void(::IStructureWireframeQueue&)> visitor);
546 // NOLINTEND
547
548public:
549 // static variables
550 // NOLINTBEGIN
551 MCAPI static ::std::add_lvalue_reference_t<float const[]> MOON_BRIGHTNESS_PER_PHASE();
552 // NOLINTEND
553
554public:
555 // constructor thunks
556 // NOLINTBEGIN
557 MCAPI void* $ctor(::DimensionArguments&& args);
558 // NOLINTEND
559
560public:
561 // destructor thunk
562 // NOLINTBEGIN
563 MCAPI void $dtor();
564 // NOLINTEND
565
566public:
567 // virtual function thunks
568 // NOLINTBEGIN
569 MCAPI void $init(::br::worldgen::StructureSetRegistry const& structureSetRegistry);
570
571 MCAPI void $tick();
572
573 MCAPI void $tickRedstone();
574
575 MCAPI void
576 $initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
577
578 MCFOLD bool $isNaturalDimension() const;
579
580 MCFOLD bool $isValidSpawn(int, int) const;
581
582 MCAPI ::mce::Color $getBrightnessDependentFogColor(::mce::Color const& baseColor, float brightness) const;
583
584 MCAPI short $getCloudHeight() const;
585
586 MCAPI ::BiomeIdType $getDefaultBiomeId() const;
587
588 MCFOLD bool $mayRespawnViaBed() const;
589
590 MCFOLD ::BlockPos $getSpawnPos() const;
591
592 MCFOLD int $getSpawnYPosition() const;
593
594 MCFOLD bool $showSky() const;
595
596 MCAPI float $getTimeOfDay(int time, float a) const;
597
598 MCFOLD void $setDimensionDirectionalLightControls(
599 ::std::variant<::Dimension::ChaoticDirectionalLightControls> const& directionalLightControls
600 );
601
602 MCAPI ::Dimension::DirectionalLightState $getDimensionDirectionalLightSourceState(float a) const;
603
604 MCAPI ::DimensionType $getDimensionId() const;
605
606 MCAPI void $forEachPlayer(::brstd::function_ref<bool(::Player&)> callback) const;
607
608 MCFOLD ::BiomeRegistry& $getBiomeRegistry();
609
610 MCFOLD ::BiomeRegistry const& $getBiomeRegistry() const;
611
612 MCFOLD ::BlockSource& $getBlockSourceFromMainChunkSource() const;
613
614 MCAPI ::Actor* $fetchEntity(::ActorUniqueID actorID, bool getRemoved) const;
615
616 MCAPI void $onChunkLoaded(::ChunkSource& source, ::LevelChunk& lc);
617
618 MCAPI void $deserialize(::CompoundTag const& tag);
619
620 MCAPI void $serialize(::CompoundTag& tag) const;
621
622 MCAPI void $sendBroadcast(::Packet const& packet, ::Player* except);
623
624 MCAPI bool $is2DPositionRelevantForPlayer(::BlockPos const& position, ::Player& player) const;
625
626 MCAPI void $buildPlayersForPositionPacket(
627 ::BlockPos const& position,
628 ::Player const* except,
629 ::std::vector<::NetworkIdentifierWithSubId>& result
630 ) const;
631
632 MCAPI void $sendPacketForPosition(::BlockPos const& position, ::Packet const& packet, ::Player const* except);
633
634 MCAPI void $sendPacketForEntity(::Actor const& actor, ::Packet const& packet, ::Player const* except);
635
636 MCAPI bool $isActorRelevantForPlayer(::Player& player, ::Actor const& actor) const;
637
638 MCAPI void $onBlockEvent(::BlockSource& source, int x, int y, int z, int b0, int b1);
639
640 MCAPI void $onBlockChanged(
641 ::BlockSource& source,
642 ::BlockPos const& pos,
643 uint layer,
644 ::Block const& block,
645 ::Block const& oldBlock,
646 int updateFlags,
647 ::ActorBlockSyncMessage const* syncMsg,
648 ::BlockChangedEventTarget eventTarget,
649 ::Actor* blockChangeSource
650 );
651
652 MCAPI void $onLevelDestruction(::std::string const&);
653
654 MCFOLD ::DimensionBrightnessRamp const& $getBrightnessRamp() const;
655
656 MCAPI ::std::vector<::std::string> const $getStructuresFromChunkRegistry(::Vec3 const& location) const;
657
658 MCAPI ::std::optional<::std::string> const $getStructureFromStructureRegistry(::Vec3 const& location) const;
659
660 MCAPI void $startLeaveGame();
661
662 MCAPI void $flushLevelChunkGarbageCollector();
663
664 MCAPI void $updatePoiBlockStateChange(::BlockPos, ::Block const&, ::Block const&) const;
665
666 MCAPI ::std::unique_ptr<::ChunkBuildOrderPolicyBase> $_createChunkBuildOrderPolicy();
667
668
669 // NOLINTEND
670
671public:
672 // vftables
673 // NOLINTBEGIN
674 MCNAPI static void** $vftableForSavedData();
675
677
678 MCNAPI static void** $vftableForIDimension();
679
680 MCNAPI static void** $vftableForLevelListener();
681 // NOLINTEND
682};
Definition Actor.h:125
Definition EnableNonOwnerReferences.h:7
Definition BiomeRegistry.h:37
Definition BlockEventDispatcher.h:19
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition ChunkBuildOrderPolicyBase.h:11
Definition ChunkLoadActionList.h:27
Definition ChunkPos.h:11
Definition ChunkSource.h:37
Definition CircuitSystem.h:16
Definition ClientDimensionExtensions.h:5
Definition CompoundTag.h:23
Definition DelayActionList.h:21
Definition DimensionBrightnessRamp.h:5
static MCAPI void ** $vftableForLevelListener()
static MCAPI void ** $vftableForSavedData()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForIDimension()
Definition EnableGetWeakRef.h:6
Definition EntityContext.h:17
Definition GameEventDispatcher.h:15
Definition IClientDimensionExtensions.h:5
Definition IDimension.h:24
Definition ILevelStorageManagerConnector.h:13
Definition ILevel.h:219
Definition IStructureWireframeQueue.h:5
Definition LevelChunkBuilderData.h:16
Definition LevelChunkMetaData.h:8
Definition LevelChunk.h:87
Definition LevelListener.h:28
Definition Level.h:255
Definition OwnerPtr.h:7
Definition Packet.h:31
Definition Player.h:137
Definition Manager.h:7
Definition PostprocessingManager.h:17
Definition RuntimeLightingManager.h:17
Definition SavedData.h:10
Definition Seasons.h:13
Definition SubChunkInterlocker.h:14
Definition TaskGroup.h:55
Definition TickingAreaList.h:15
Definition Vec3.h:10
Definition VillageManager.h:31
Definition WeakEntityRef.h:14
Definition WeakRef.h:8
Definition Weather.h:20
Definition WorldGenerator.h:31
Definition StructureSetRegistry.h:12
Definition function_ref.h:60
Definition Color.h:13
STL namespace.
Definition ActorBlockSyncMessage.h:8
Definition ActorChunkTransferEntry.h:8
Definition ActorUniqueID.h:10
Definition ActorUnloadedChunkTransferEntry.h:13
Definition BiomeIdType.h:8
Definition Brightness.h:8
Definition DimensionArguments.h:10
Definition DimensionType.h:5
Definition Dimension.h:109
Definition NetworkIdentifierWithSubId.h:10
Definition UpdateSubChunkBlocksChangedInfo.h:13
Definition UpdateSubChunkNetworkBlockInfo.h:9