88 public ::std::enable_shared_from_this<::Dimension> {
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;
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;
119 using ActorTagList = ::std::vector<::std::unique_ptr<::CompoundTag>>;
121 using ChunkPosToActorListMap = ::std::unordered_map<::ChunkPos, ::std::vector<::std::unique_ptr<::CompoundTag>>>;
123 using DirectionalLightControls = ::std::variant<::Dimension::ChaoticDirectionalLightControls>;
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>>>>
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;
193 Dimension& operator=(Dimension
const&);
194 Dimension(Dimension
const&);
200 virtual ~Dimension() ;
206 virtual void tickRedstone();
208 virtual ::std::unique_ptr<::WorldGenerator>
215 virtual void initializeWithLevelStorageManagerConnector(
219 virtual bool levelChunkNeedsUpgrade(
::LevelChunk const& lc)
const = 0;
221 virtual bool isNaturalDimension() const ;
223 virtual
bool isValidSpawn(
int,
int) const;
225 virtual ::mce::Color getBrightnessDependentFogColor(::mce::Color const& baseColor,
float brightness) const;
227 virtual
short getCloudHeight() const;
231 virtual
bool mayRespawnViaBed() const;
233 virtual ::
BlockPos getSpawnPos() const;
235 virtual
int getSpawnYPosition() const;
237 virtual
bool showSky() const;
239 virtual
float getTimeOfDay(
int time,
float a) const;
241 virtual
void setDimensionDirectionalLightControls(
247 virtual ::DimensionType getDimensionId() const ;
249 virtual
void forEachPlayer(::brstd::function_ref<
bool(::
Player&)> callback) const ;
255 virtual ::
BlockSource& getBlockSourceFromMainChunkSource() const ;
261 virtual
void deserialize(::
CompoundTag const& tag) ;
265 virtual
void sendBroadcast(::
Packet const& packet, ::
Player* except);
267 virtual
bool is2DPositionRelevantForPlayer(::
BlockPos const& position, ::
Player& player) const;
269 virtual
void buildPlayersForPositionPacket(
276 sendPacketForPosition(::
BlockPos const& position, ::
Packet const& packet, ::
Player const* except) ;
278 virtual
void sendPacketForEntity(::
Actor const& actor, ::
Packet const& packet, ::
Player const* except) ;
280 virtual
bool isActorRelevantForPlayer(::
Player& player, ::
Actor const& actor) const;
282 virtual
void onBlockEvent(::
BlockSource& source,
int x,
int y,
int z,
int b0,
int b1) ;
284 virtual
void onBlockChanged(
288 ::
Block const& block,
289 ::
Block const& oldBlock,
292 ::BlockChangedEventTarget eventTarget,
293 ::
Actor* blockChangeSource
296 virtual
void onLevelDestruction(::
std::
string const&) ;
300 virtual ::
std::vector<::
std::
string> const getStructuresFromChunkRegistry(::
Vec3 const& location) const;
302 virtual ::
std::optional<::
std::
string> const getStructureFromStructureRegistry(::
Vec3 const& location) const;
304 virtual
void startLeaveGame();
306 virtual
void flushLevelChunkGarbageCollector() ;
308 virtual
void updatePoiBlockStateChange(::
BlockPos, ::
Block const&, ::
Block const&) const ;
312 virtual
void _upgradeOldLimboEntity(::
CompoundTag& tag, ::LimboEntitiesVersion vers) = 0;
314 virtual ::
std::unique_ptr<::
ChunkSource> _wrapStorageForVersionCompatibility(
316 ::StorageVersion levelVersion
325 MCAPI
void _addActorUnloadedChunkTransferToQueue(
328 ::DimensionType dimId,
329 ::
std::
string& actorStorageKey,
337 MCAPI
void _processEntityChunkTransfers();
339 MCAPI
void _runChunkGenerationWatchdog();
341 MCAPI
void _sendBlockEntityUpdatePacket(::
BlockPos const& pos);
343 MCAPI
void _sendBlocksChangedPackets();
347 MCAPI
void _tickEntityChunkMoves();
349 MCAPI
void addPlayerToReplication(::
WeakEntityRef const& player);
353 MCAPI
void clearPlayerReplicationList();
355 MCAPI
float distanceToNearestPlayerSqr2D(::
Vec3 origin);
357 MCAPI ::
Player* fetchAnyInteractablePlayer(::
Vec3 const& searchPos,
float maxDist) const;
359 MCAPI ::
Player* fetchNearestAttackablePlayer(::
Actor& source,
float maxDist) const;
361 MCAPI ::
Player* fetchNearestAttackablePlayer(::
BlockPos source,
float maxDist, ::
Actor* sourceActor) const;
363 MCAPI ::
Player* fetchNearestInteractablePlayer(::
Vec3 const& searchPos,
float maxDist) const;
365 MCAPI ::
Player* fetchNearestInteractablePlayer(::
Actor& source,
float maxDist) const;
367 MCAPI ::
Player* fetchNearestPlayer(
368 ::
Vec3 const& searchPos,
371 ::brstd::function_ref<
bool(::
Player const&)> playerFilter
374 MCAPI ::
Player* findPlayer(::brstd::function_ref<
bool(::
Player const&)> pred) const;
376 MCAPI
void flagEntityforChunkMove(::
Actor& e);
378 MCAPI
void flushRunTimeLighting();
397 MCFOLD ::std::unordered_map<::ActorUniqueID, ::WeakEntityRef>
const& getEntityIdMapConst()
const;
400 MCFOLD ::FeatureTerrainAdjustments& getFeatureTerrainAdjustments();
402 MCAPI ::GameEventDispatcher* getGameEventDispatcher()
const;
404 MCAPI
short getHeight()
const;
406 MCAPI ushort getHeightInSubchunks()
const;
408 MCFOLD ::DimensionHeightRange
const& getHeightRange()
const;
410 MCFOLD ::Level& getLevel()
const;
412 MCFOLD ::Level
const& getLevelConst()
const;
414 MCAPI ::std::string getLocalizationKey()
const;
416 MCAPI
short getMinHeight()
const;
418 MCAPI uchar getMonsterSpawnBlockLightLimit()
const;
420 MCAPI ::IntProvider getMonsterSpawnLightTest()
const;
422 MCAPI
float getMoonBrightness()
const;
424 MCAPI
int getMoonPhase()
const;
426 MCAPI ::Brightness getOldSkyDarken(
float a);
428 MCAPI
float getPopCap(
int catID,
bool surface)
const;
430 MCFOLD ::Seasons& getSeasons();
433 MCAPI
float getSkyDarken(
float a)
const;
436 MCAPI ::Brightness getSkyDarken()
const;
438 MCAPI
float getSunAngle(
float a)
const;
440 MCFOLD ::std::shared_ptr<::LevelChunkMetaData const> getTargetMetaData();
442 MCFOLD ::TickingAreaList& getTickingAreas();
444 MCFOLD ::TickingAreaList
const& getTickingAreasConst()
const;
446 MCAPI
float getTimeOfDay(
float a)
const;
448 MCFOLD ::std::string
const& getTypeId()
const;
450 MCAPI ::std::unique_ptr<::VillageManager>
const& getVillageManager()
const;
452 MCAPI ::WeakRef<::Dimension> getWeakRef();
454 MCFOLD ::Weather& getWeather()
const;
456 MCFOLD ::WorldGenerator* getWorldGenerator()
const;
459 MCAPI
bool hasAddedWither()
const;
462 MCAPI
bool hasCeiling()
const;
464 MCFOLD
bool hasSkylight()
const;
466 MCAPI
bool isBrightOutside()
const;
468 MCAPI
bool isChunkKnown(
::ChunkPos const& chunkPos)
const;
470 MCAPI
bool const isClientSideGenerationEnabled()
const;
472 MCAPI
bool isHeightWithinRange(
short const& height)
const;
474 MCAPI
bool isLeaveGameDone();
476 MCAPI
bool isMoonVisible()
const;
478 MCAPI
bool isRedstoneTick();
480 MCAPI
bool isSubChunkHeightWithinRange(
short const& subChunkHeight)
const;
482 MCAPI
bool isUltraWarm()
const;
486 MCAPI
void onStaticTickingAreaAdded(::std::string
const& tickingAreaName);
488 MCAPI
void pauseAndFlushTaskGroups();
490 MCAPI
void processPlayerReplication();
502 MCAPI
void sendPacketToClients(
::Packet const& packet, ::std::vector<::NetworkIdentifierWithSubId> ids);
504 MCAPI
void setCeiling(
bool ceiling);
507 MCAPI
void setRunChunkGenWatchDog(
bool runWatchDog);
510 MCAPI
void setSkylight(
bool skylight);
512 MCAPI
void setUltraWarm(
bool warm);
519 transferEntity(
::ChunkPos const& fromChunkPos,
::Vec3 const& spawnPos, ::std::unique_ptr<::CompoundTag> entityTag);
523 MCAPI
void tryGarbageCollectStructures();
525 MCAPI
void tryLoadLimboEntities(
::ChunkPos const& loadPos);
531 MCAPI
void updateBlockLight(
550 MCAPI static ::std::add_lvalue_reference_t<float const[]> MOON_BRIGHTNESS_PER_PHASE();
572 MCAPI
void $tickRedstone();
577 MCFOLD
bool $isNaturalDimension()
const;
579 MCFOLD
bool $isValidSpawn(
int,
int)
const;
581 MCAPI ::mce::Color $getBrightnessDependentFogColor(
::mce::Color const& baseColor,
float brightness)
const;
583 MCAPI
short $getCloudHeight()
const;
585 MCAPI ::BiomeIdType $getDefaultBiomeId()
const;
587 MCFOLD
bool $mayRespawnViaBed()
const;
589 MCFOLD ::BlockPos $getSpawnPos()
const;
591 MCFOLD
int $getSpawnYPosition()
const;
593 MCFOLD
bool $showSky()
const;
595 MCAPI
float $getTimeOfDay(
int time,
float a)
const;
597 MCFOLD
void $setDimensionDirectionalLightControls(
598 ::std::variant<::Dimension::ChaoticDirectionalLightControls>
const& directionalLightControls
601 MCAPI ::Dimension::DirectionalLightState $getDimensionDirectionalLightSourceState(
float a)
const;
603 MCAPI ::DimensionType $getDimensionId()
const;
607 MCFOLD ::BiomeRegistry& $getBiomeRegistry();
609 MCFOLD ::BiomeRegistry
const& $getBiomeRegistry()
const;
611 MCFOLD ::BlockSource& $getBlockSourceFromMainChunkSource()
const;
613 MCAPI ::Actor* $fetchEntity(
::ActorUniqueID actorID,
bool getRemoved)
const;
623 MCAPI
bool $is2DPositionRelevantForPlayer(
::BlockPos const& position,
::Player& player)
const;
625 MCAPI
void $buildPlayersForPositionPacket(
628 ::std::vector<::NetworkIdentifierWithSubId>& result
635 MCAPI
bool $isActorRelevantForPlayer(
::Player& player,
::Actor const& actor)
const;
637 MCAPI
void $onBlockEvent(
::BlockSource& source,
int x,
int y,
int z,
int b0,
int b1);
639 MCAPI
void $onBlockChanged(
647 ::BlockChangedEventTarget eventTarget,
651 MCAPI
void $onLevelDestruction(::std::string
const&);
653 MCFOLD ::DimensionBrightnessRamp
const& $getBrightnessRamp()
const;
655 MCAPI ::std::vector<::std::string>
const $getStructuresFromChunkRegistry(
::Vec3 const& location)
const;
657 MCAPI ::std::optional<::std::string>
const $getStructureFromStructureRegistry(
::Vec3 const& location)
const;
659 MCAPI
void $startLeaveGame();
661 MCAPI
void $flushLevelChunkGarbageCollector();
665 MCAPI ::std::unique_ptr<::ChunkBuildOrderPolicyBase> $_createChunkBuildOrderPolicy();