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