86 public ::std::enable_shared_from_this<::Dimension> {
99 ::ll::TypedStorage<4, 4, float> mMinFlashDuration;
100 ::ll::TypedStorage<4, 4, float> mMaxFlashDuration;
101 ::ll::TypedStorage<4, 4, float> mMinFlashCooldown;
102 ::ll::TypedStorage<4, 4, float> mMaxFlashCooldown;
110 ::ll::TypedStorage<4, 4, float> mAngle;
111 ::ll::TypedStorage<4, 4, float> mPerpendicularAngle;
112 ::ll::TypedStorage<4, 4, float> mIntensityMultiplier;
113 ::ll::TypedStorage<4, 4, ::DirectionalLightSource> mLightSource;
117 using ActorTagList = ::std::vector<::std::unique_ptr<::CompoundTag>>;
119 using ChunkPosToActorListMap = ::std::unordered_map<::ChunkPos, ::std::vector<::std::unique_ptr<::CompoundTag>>>;
121 using DirectionalLightControls = ::std::variant<::Dimension::ChaoticDirectionalLightControls>;
126 ::ll::TypedStorage<8, 24, ::std::vector<::ActorChunkTransferEntry>> mActorChunkTransferQueue;
127 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkKey, ::std::vector<::ActorUnloadedChunkTransferEntry>>>
128 mActorUnloadedChunkTransferQueue;
129 ::ll::TypedStorage<8, 8, ::ILevel&> mLevel;
130 ::ll::TypedStorage<2, 4, ::DimensionHeightRange> mHeightRange;
131 ::ll::TypedStorage<2, 2, short> mSeaLevel;
132 ::ll::TypedStorage<1, 1, uchar> mMonsterSpawnBlockLightLimit;
133 ::ll::TypedStorage<8, 32, ::IntProvider> mMonsterSpawnLightTest;
134 ::ll::TypedStorage<8, 16, ::OwnerPtr<::BlockSource>> mBlockSource;
135 ::ll::TypedStorage<1, 1, bool> mHasWeather;
136 ::ll::TypedStorage<4, 28, float[7]> mMobsPerChunkSurface;
137 ::ll::TypedStorage<4, 28, float[7]> mMobsPerChunkUnderground;
138 ::ll::TypedStorage<1, 2, ::BrightnessPair> mDefaultBrightness;
139 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DimensionBrightnessRamp>> mDimensionBrightnessRamp;
140 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::LevelChunkMetaData>> mTargetMetaData;
141 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RuntimeLightingManager>> mRuntimeLightingManager;
142 ::ll::TypedStorage<8, 32, ::std::string> mName;
143 ::ll::TypedStorage<4, 4, ::DimensionType> mId;
144 ::ll::TypedStorage<2, 2, ::DimensionIdType const> mRegistryId;
145 ::ll::TypedStorage<1, 1, bool> mUltraWarm;
146 ::ll::TypedStorage<1, 1, bool> mHasCeiling;
147 ::ll::TypedStorage<1, 1, bool> mHasSkylight;
148 ::ll::TypedStorage<1, 1, ::Brightness> mSkyDarken;
149 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockEventDispatcher>> mDispatcher;
150 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
151 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mChunkGenTaskGroup;
152 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PostprocessingManager>> mPostProcessingManager;
153 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SubChunkInterlocker>> mSubChunkInterlocker;
154 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkSource>> mChunkSource;
155 ::ll::TypedStorage<8, 8, ::WorldGenerator*> mWorldGenerator;
156 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Weather>> mWeather;
157 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Seasons>> mSeasons;
158 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameEventDispatcher>> mGameEventDispatcher;
159 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CircuitSystem>> mCircuitSystem;
160 ::ll::TypedStorage<4, 4, int const> CIRCUIT_TICK_RATE;
161 ::ll::TypedStorage<4, 4, int> mCircuitSystemTickRate;
162 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ActorUniqueID, ::WeakEntityRef>> mActorIDEntityIDMap;
163 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mDisplayEntities;
164 ::ll::TypedStorage<8, 72, ::FeatureTerrainAdjustments> mFeatureTerrainAdjustments;
165 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::vector<::std::unique_ptr<::CompoundTag>>>>
167 ::ll::TypedStorage<8, 16, ::std::set<::ActorUniqueID>> mEntitiesToMoveChunks;
168 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::TickingAreaList>> mTickingAreaList;
169 ::ll::TypedStorage<8, 632, ::LevelChunkGarbageCollector> mLevelChunkGarbageCollector;
170 ::ll::TypedStorage<8, 16, ::std::set<::ActorUniqueID>> mWitherIDs;
171 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelChunkBuilderData>> mLevelChunkBuilderData;
172 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPruneTime;
173 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastStructurePruneTime;
174 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkBuildOrderPolicyBase>> mChunkBuildOrderPolicy;
175 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::VillageManager>> mVillageManager;
176 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Poi::Manager>> mPoiManager;
177 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkIdentifierWithSubId>> mTemporaryPlayerIds;
178 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkLoadActionList>> mChunkLoadActionList;
179 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DelayActionList>> mDelayActionList;
180 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SubChunkPos, ::UpdateSubChunkBlocksChangedInfo>>
181 mBlocksChangedBySubChunkMap;
182 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IClientDimensionExtensions>> mClientExtensions;
183 ::ll::TypedStorage<8, 112, ::ActorReplication> mActorReplication;
184 ::ll::TypedStorage<8, 24, ::std::vector<::WeakEntityRef>> mPlayersToReplicate;
185 ::ll::TypedStorage<1, 1, bool> mRunChunkGenWatchDog;
190 Dimension& operator=(Dimension
const&);
191 Dimension(Dimension
const&);
197 virtual ~Dimension() ;
203 virtual void tickRedstone();
205 virtual ::std::unique_ptr<::WorldGenerator>
212 virtual void initializeWithLevelStorageManagerConnector(
216 virtual bool levelChunkNeedsUpgrade(
::LevelChunk const& lc)
const = 0;
218 virtual bool isNaturalDimension() const ;
220 virtual
bool isValidSpawn(
int x,
int z) const;
222 virtual ::mce::Color getBrightnessDependentFogColor(::mce::Color const& baseColor,
float brightness) const;
224 virtual
short getCloudHeight() const;
228 virtual
bool mayRespawnViaBed() const;
230 virtual ::
BlockPos getSpawnPos() const;
232 virtual
int getSpawnYPosition() const;
234 virtual
bool showSky() const;
236 virtual
float getTimeOfDay(
int time,
float a) const;
238 virtual
void setDimensionDirectionalLightControls(
244 virtual ::DimensionType getDimensionId() const ;
246 virtual
void forEachPlayer(::brstd::function_ref<
bool(::
Player&)> callback) const ;
252 virtual ::
BlockSource& getBlockSourceFromMainChunkSource() const ;
258 virtual
void deserialize(::
CompoundTag const& tag) ;
262 virtual
void sendBroadcast(::
Packet const& packet, ::
Player* except);
264 virtual
bool is2DPositionRelevantForPlayer(::
BlockPos const& position, ::
Player& player) const;
266 virtual
void buildPlayersForPositionPacket(
273 sendPacketForPosition(::
BlockPos const& position, ::
Packet const& packet, ::
Player const* except) ;
275 virtual
void sendPacketForEntity(::
Actor const& actor, ::
Packet const& packet, ::
Player const* except) ;
277 virtual
bool isActorRelevantForPlayer(::
Player& player, ::
Actor const& actor) const;
279 virtual
void onBlockEvent(::
BlockSource& source,
int x,
int y,
int z,
int b0,
int b1) ;
281 virtual
void onBlockChanged(
285 ::
Block const& block,
286 ::
Block const& oldBlock,
289 ::BlockChangedEventTarget eventTarget,
290 ::
Actor* blockChangeSource
293 virtual
void onLevelDestruction(::
std::
string const&) ;
297 virtual ::
std::vector<::
std::
string> const getStructuresFromChunkRegistry(::
Vec3 const& location) const;
299 virtual ::
std::optional<::
std::
string> const getStructureFromStructureRegistry(::
Vec3 const& location) const;
301 virtual
void startLeaveGame();
303 virtual
void flushLevelChunkGarbageCollector() ;
305 virtual
void updatePoiBlockStateChange(::
BlockPos pos, ::
Block const& removed, ::
Block const& placed) const
310 virtual
void _upgradeOldLimboEntity(::
CompoundTag& tag, ::LimboEntitiesVersion vers) = 0;
312 virtual ::
std::unique_ptr<::
ChunkSource> _wrapStorageForVersionCompatibility(
314 ::StorageVersion levelVersion
323 MCAPI
void _addActorUnloadedChunkTransferToQueue(
326 ::DimensionType dimId,
327 ::
std::
string& actorStorageKey,
333 MCAPI ::Bedrock::NonOwnerPointer<::
ChunkSource> _getOrCreateClientServerMainChunkSource() const;
335 MCAPI
void _processEntityChunkTransfers();
337 MCAPI
void _runChunkGenerationWatchdog();
339 MCAPI
void _sendBlocksChangedPackets();
341 MCAPI
void _tickEntityChunkMoves();
345 MCAPI ::
Player* fetchAnyInteractablePlayer(::
Vec3 const& searchPos,
float maxDist) const;
347 MCAPI ::
Player* fetchNearestAttackablePlayer(::
Actor& source,
float maxDist) const;
349 MCAPI ::
Player* fetchNearestInteractablePlayer(::
Vec3 const& searchPos,
float maxDist) const;
351 MCAPI ::
Player* fetchNearestPlayer(
352 ::
Vec3 const& searchPos,
355 ::brstd::function_ref<
bool(::
Player const&)> playerFilter
358 MCAPI ::
Player* findPlayer(::brstd::function_ref<
bool(::
Player const&)> pred) const;
360 MCAPI
void flagEntityforChunkMove(::
Actor& e);
364 MCAPI ushort getHeightInSubchunks() const;
366 MCAPI
float getMoonBrightness() const;
369 MCAPI
int getMoonPhase()
const;
372 MCAPI ::Brightness getOldSkyDarken(
float a);
375 MCAPI
float getSkyDarken(
float a)
const;
377 MCAPI
float getSunAngle(
float a)
const;
379 MCAPI
float getTimeOfDay(
float a)
const;
382 MCAPI
bool isBrightOutside()
const;
386 MCAPI
bool operator==(::Dimension
const& rhs)
const;
395 transferEntity(
::ChunkPos const& fromChunkPos,
::Vec3 const& spawnPos, ::std::unique_ptr<::CompoundTag> entityTag);
399 MCAPI
void transferEntityToUnloadedChunk(
402 ::DimensionType dimId,
403 ::std::string& actorStorageKey,
404 ::std::unique_ptr<::CompoundTag> entityTag
407 MCAPI
void tryGarbageCollectStructures();
409 MCAPI
void tryLoadLimboEntities(
::ChunkPos const& loadPos);
417 MCAPI static ::std::add_lvalue_reference_t<float const[]> MOON_BRIGHTNESS_PER_PHASE();
439 MCAPI
void $tickRedstone();
444 MCFOLD
bool $isNaturalDimension()
const;
446 MCFOLD
bool $isValidSpawn(
int x,
int z)
const;
448 MCAPI ::mce::Color $getBrightnessDependentFogColor(
::mce::Color const& baseColor,
float brightness)
const;
450 MCFOLD
short $getCloudHeight()
const;
452 MCAPI ::BiomeIdType $getDefaultBiomeId()
const;
454 MCFOLD
bool $mayRespawnViaBed()
const;
456 MCFOLD ::BlockPos $getSpawnPos()
const;
458 MCFOLD
int $getSpawnYPosition()
const;
460 MCFOLD
bool $showSky()
const;
462 MCAPI
float $getTimeOfDay(
int time,
float a)
const;
464 MCFOLD
void $setDimensionDirectionalLightControls(
465 ::std::variant<::Dimension::ChaoticDirectionalLightControls>
const& directionalLightControls
468 MCAPI ::Dimension::DirectionalLightState $getDimensionDirectionalLightSourceState(
float a)
const;
470 MCAPI ::DimensionType $getDimensionId()
const;
474 MCFOLD ::BiomeRegistry& $getBiomeRegistry();
476 MCFOLD ::BiomeRegistry
const& $getBiomeRegistry()
const;
478 MCFOLD ::BlockSource& $getBlockSourceFromMainChunkSource()
const;
480 MCAPI ::Actor* $fetchEntity(
::ActorUniqueID actorID,
bool getRemoved)
const;
490 MCAPI
bool $is2DPositionRelevantForPlayer(
::BlockPos const& position,
::Player& player)
const;
492 MCAPI
void $buildPlayersForPositionPacket(
495 ::std::vector<::NetworkIdentifierWithSubId>& result
502 MCAPI
bool $isActorRelevantForPlayer(
::Player& player,
::Actor const& actor)
const;
504 MCAPI
void $onBlockEvent(
::BlockSource& source,
int x,
int y,
int z,
int b0,
int b1);
506 MCAPI
void $onBlockChanged(
514 ::BlockChangedEventTarget eventTarget,
518 MCAPI
void $onLevelDestruction(::std::string
const&);
520 MCFOLD ::DimensionBrightnessRamp
const& $getBrightnessRamp()
const;
522 MCAPI ::std::vector<::std::string>
const $getStructuresFromChunkRegistry(
::Vec3 const& location)
const;
524 MCAPI ::std::optional<::std::string>
const $getStructureFromStructureRegistry(
::Vec3 const& location)
const;
526 MCAPI
void $startLeaveGame();
528 MCAPI
void $flushLevelChunkGarbageCollector();
532 MCAPI ::std::unique_ptr<::ChunkBuildOrderPolicyBase> $_createChunkBuildOrderPolicy();