LeviLamina
Loading...
Searching...
No Matches
LevelData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/GameVersion.h"
7#include "mc/common/editor/WorldType.h"
8#include "mc/config/ChatRestrictionLevel.h"
9#include "mc/deps/core/sem_ver/SemVersion.h"
10#include "mc/deps/core/utility/pub_sub/Publisher.h"
11#include "mc/deps/core/utility/pub_sub/Subscription.h"
12#include "mc/deps/json/Value.h"
13#include "mc/deps/shared_types/legacy/Difficulty.h"
14#include "mc/network/GamePublishSetting.h"
15#include "mc/options/EducationEditionOffer.h"
16#include "mc/options/EducationEditionOfferValue.h"
17#include "mc/world/actor/player/Abilities.h"
18#include "mc/world/actor/player/PermissionsHandler.h"
19#include "mc/world/level/BlockPos.h"
20#include "mc/world/level/DaylightCycle.h"
21#include "mc/world/level/GameType.h"
22#include "mc/world/level/GeneratorType.h"
23#include "mc/world/level/NetherWorldType.h"
24#include "mc/world/level/SpawnSettings.h"
25#include "mc/world/level/Tick.h"
26#include "mc/world/level/WorldVersion.h"
27#include "mc/world/level/levelgen/flat/FlatWorldPresetID.h"
28#include "mc/world/level/storage/AdventureSettings.h"
29#include "mc/world/level/storage/CloudSaveLevelInfo.h"
30#include "mc/world/level/storage/ExperimentStorage.h"
31#include "mc/world/level/storage/GameRules.h"
32#include "mc/world/level/storage/StorageVersion.h"
33#include "mc/world/level/storage/WorldTemplateLevelData.h"
34
35// auto generated forward declare list
36// clang-format off
37class BaseGameVersion;
38class CompoundTag;
39class HashedString;
41class LevelSeed64;
42class LevelSettings;
44struct LevelDataValue;
45namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
46namespace RakNet { class BitStream; }
47// clang-format on
48
49class LevelData {
50public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<1, 5, ::AdventureSettings> mAdventureSettings;
54 ::ll::TypedStorage<8, 144, ::WorldTemplateLevelData> mWorldTemplateLevelData;
55 ::ll::TypedStorage<8, 192, ::GameRules> mGameRules;
56 ::ll::TypedStorage<8, 72, ::ExperimentStorage> mExperiments;
57 ::ll::TypedStorage<4, 240, ::Abilities> mDefaultAbilities;
58 ::ll::TypedStorage<1, 2, ::PermissionsHandler> mDefaultPermissions;
59 ::ll::TypedStorage<8, 32, ::std::string> mLevelName;
60 ::ll::TypedStorage<4, 4, ::StorageVersion> mStorageVersion;
61 ::ll::TypedStorage<8, 56, ::GameVersion> mMinCompatibleClientVersion;
62 ::ll::TypedStorage<4, 4, int> mNetworkVersion;
63 ::ll::TypedStorage<8, 24, ::SemVersion> mInventoryVersion;
64 ::ll::TypedStorage<8, 8, ::Tick> mCurrentTick;
65 ::ll::TypedStorage<1, 1, bool> mHasSpawnPos;
66 ::ll::TypedStorage<4, 12, ::BlockPos> mLimitedWorldOrigin;
67 ::ll::TypedStorage<4, 4, int> mTime;
68 ::ll::TypedStorage<8, 8, int64> mLastSaved;
69 ::ll::TypedStorage<4, 4, uint> mServerTickRange;
70 ::ll::TypedStorage<4, 4, float> mRainLevel;
71 ::ll::TypedStorage<4, 4, int> mRainTime;
72 ::ll::TypedStorage<4, 4, float> mLightningLevel;
73 ::ll::TypedStorage<4, 4, int> mLightningTime;
74 ::ll::TypedStorage<4, 4, int> mNetherScale;
75 ::ll::TypedStorage<8, 56, ::GameVersion> mLastOpenedWithVersion;
76 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::Difficulty> mGameDifficulty;
77 ::ll::TypedStorage<1, 1, bool> mForceGameType;
78 ::ll::TypedStorage<1, 1, bool> mIsHardcore;
79 ::ll::TypedStorage<1, 1, bool> mPlayerHasDied;
80 ::ll::TypedStorage<1, 1, bool> mSpawnMobs;
81 ::ll::TypedStorage<1, 1, bool> mAdventureModeOverridesEnabled;
82 ::ll::TypedStorage<8, 16, ::Json::Value> mFlatWorldOptions;
83 ::ll::TypedStorage<4, 4, uint> mWorldStartCount;
84 ::ll::TypedStorage<1, 1, bool> mAchievementsDisabled;
85 ::ll::TypedStorage<4, 4, ::Editor::WorldType> mEditorWorldType;
86 ::ll::TypedStorage<1, 1, bool> mIsCreatedInEditor;
87 ::ll::TypedStorage<1, 1, bool> mIsExportedFromEditor;
88 ::ll::TypedStorage<4, 4, ::EducationEditionOfferValue> mEducationEditionOffer;
89 ::ll::TypedStorage<8, 176, ::std::optional<::CloudSaveLevelInfo>> mCloudSaveInfo;
90 ::ll::TypedStorage<1, 1, bool> mEducationFeaturesEnabled;
91 ::ll::TypedStorage<1, 1, bool> mIsSingleUseWorld;
92 ::ll::TypedStorage<1, 1, bool> mConfirmedPlatformLockedContent;
93 ::ll::TypedStorage<1, 1, bool> mMultiplayerGameIntent;
94 ::ll::TypedStorage<1, 1, bool> mMultiplayerGame;
95 ::ll::TypedStorage<1, 1, bool> mLANBroadcastIntent;
96 ::ll::TypedStorage<1, 1, bool> mLANBroadcast;
97 ::ll::TypedStorage<4, 4, ::Social::GamePublishSetting> mXBLBroadcastIntent;
98 ::ll::TypedStorage<4, 4, ::Social::GamePublishSetting> mXBLBroadcastMode;
99 ::ll::TypedStorage<4, 4, ::Social::GamePublishSetting> mPlatformBroadcastIntent;
100 ::ll::TypedStorage<4, 4, ::Social::GamePublishSetting> mPlatformBroadcastMode;
101 ::ll::TypedStorage<1, 1, bool> mCheatsEnabled;
102 ::ll::TypedStorage<1, 1, bool> mCommandsEnabled;
103 ::ll::TypedStorage<1, 1, bool> mTexturePacksRequired;
104 ::ll::TypedStorage<1, 1, bool> mHasLockedBehaviorPack;
105 ::ll::TypedStorage<1, 1, bool> mHasLockedResourcePack;
106 ::ll::TypedStorage<1, 1, bool> mIsFromLockedTemplate;
107 ::ll::TypedStorage<1, 1, bool> mIsRandomSeedAllowed;
108 ::ll::TypedStorage<8, 32, ::std::string> mEducationProductId;
109 ::ll::TypedStorage<8, 32, ::std::string> mEducationCreatorId;
110 ::ll::TypedStorage<8, 32, ::std::string> mEducationCreatorWorldId;
111 ::ll::TypedStorage<8, 32, ::std::string> mEducationReferrerId;
112 ::ll::TypedStorage<8, 32, ::std::string> mEducationReferrerType;
113 ::ll::TypedStorage<1, 1, bool> mUseMsaGamertagsOnly;
114 ::ll::TypedStorage<1, 1, bool> mBonusChestEnabled;
115 ::ll::TypedStorage<1, 1, bool> mBonusChestSpawned;
116 ::ll::TypedStorage<1, 1, bool> mStartWithMapEnabled;
117 ::ll::TypedStorage<1, 1, bool> mMapsCenteredToOrigin;
118 ::ll::TypedStorage<1, 1, bool> mRequiresCopiedPackRemovalCheck;
119 ::ll::TypedStorage<1, 1, bool> mSpawnV1Villagers;
120 ::ll::TypedStorage<1, 1, bool> mPersonaDisabled;
121 ::ll::TypedStorage<1, 1, bool> mCustomSkinsDisabled;
122 ::ll::TypedStorage<1, 1, bool> mEmoteChatMuted;
123 ::ll::TypedStorage<1, 1, bool> mHasUncompleteWorldFileOnDisk;
124 ::ll::TypedStorage<1, 1, ::NetherWorldType> mNetherType;
125 ::ll::TypedStorage<8, 48, ::SpawnSettings> mSpawnSettings;
126 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::LevelDataValue>> mValues;
127 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::LevelDataValue>> mOverrides;
128 ::ll::TypedStorage<8, 32, ::std::string> mBiomeOverride;
129 ::ll::TypedStorage<4, 8, ::std::optional<::GeneratorType>> mDataDrivenGeneratorType;
130 ::ll::TypedStorage<1, 1, ::ChatRestrictionLevel> mChatRestrictionLevel;
131 ::ll::TypedStorage<
132 8,
133 8,
135 mIsHardcoreSubscribers;
136 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveLevelData;
137 // NOLINTEND
138
139public:
140 // prevent constructor by default
141 LevelData& operator=(LevelData const&);
142 LevelData(LevelData const&);
143 LevelData();
144
145public:
146 // member functions
147 // NOLINTBEGIN
148 MCAPI LevelData(::LevelData&&);
149
150 MCAPI explicit LevelData(bool isEduMode);
151
152 MCAPI LevelData(
153 ::LevelSettings const& settings,
154 ::std::string const& levelName,
155 ::GeneratorType generatorVersion,
156 ::BlockPos const& defaultSpawn,
157 bool achievementsDisabled,
158 ::EducationEditionOffer eduOffer,
159 float rainLevel,
160 float lightningLevel
161 );
162
163 MCAPI void _determineMaxBaseGameVersion();
164
165 MCAPI void _setValue(::HashedString const& key, ::LevelDataValue&& value);
166
167 MCAPI void _updateLimitedWorldOrigin(::BlockPos const& pos);
168
169 MCAPI ::std::optional<::SemVersion> checkServerAuthOptOutVersion() const;
170
171 MCAPI bool cloudSaveForWorldIsEnabled() const;
172
173 MCAPI ::std::unique_ptr<::CompoundTag> createTag() const;
174
175 MCAPI ::BaseGameVersion const& getBaseGameVersion() const;
176
177 MCAPI ::DaylightCycle getDaylightCycle() const;
178
179 MCAPI ::CompoundTag const& getEduSharedUriResource() const;
180
181 MCAPI ::std::string const& getEducationOid() const;
182
183 MCAPI ::GameType getGameType() const;
184
185 MCAPI ::GeneratorType getGenerator() const;
186
187 MCAPI int getLimitedWorldDepth() const;
188
189 MCAPI int getLimitedWorldWidth() const;
190
191 MCAPI ::LevelSeed64 getSeed() const;
192
193 MCAPI ::BlockPos const& getSpawnPos() const;
194
195 MCAPI void getTagData(::CompoundTag const& tag);
196
197 MCAPI ::WorldVersion getWorldVersion() const;
198
199 MCAPI void registerWithLevelStorageManagerEvents(::ILevelStorageManagerConnector& levelStorageManagerConnector);
200
201 MCAPI void setDaylightCycle(::DaylightCycle daylightCycle);
202
203 MCAPI void setEduSharedUriResource(::EduSharedUriResource const& eduSharedUriResource);
204
205 MCAPI void setEducationEditionOffer(::EducationEditionOffer offer);
206
207 MCAPI void setEducationOid(::std::string const& educationOid);
208
209 MCAPI void setFlatWorldOptions(::Json::Value const& options);
210
211 MCAPI void setFlatWorldPreset(::FlatWorldPresetID preset);
212
213 MCAPI void setGameType(::GameType type);
214
215 MCAPI void setGenerator(::GeneratorType version);
216
217 MCAPI void setIsHardcore(bool value);
218
219 MCAPI void setLevelName(::std::string const& levelName);
220
221 MCAPI void setSeed(::LevelSeed64 seed);
222
223 MCAPI void setSpawnPos(::BlockPos const& spawn);
224
225 MCAPI void setTagData(::CompoundTag& tag) const;
226
227 MCAPI void setWorldVersion(::WorldVersion version);
228
229 MCAPI void touchLastLoadedWithVersion();
230
231 MCAPI void v1_read(::RakNet::BitStream& bitStream, ::StorageVersion storageVersion);
232
233 MCAPI ~LevelData();
234 // NOLINTEND
235
236public:
237 // constructor thunks
238 // NOLINTBEGIN
239 MCAPI void* $ctor(::LevelData&&);
240
241 MCAPI void* $ctor(bool isEduMode);
242
243 MCAPI void* $ctor(
244 ::LevelSettings const& settings,
245 ::std::string const& levelName,
246 ::GeneratorType generatorVersion,
247 ::BlockPos const& defaultSpawn,
248 bool achievementsDisabled,
249 ::EducationEditionOffer eduOffer,
250 float rainLevel,
251 float lightningLevel
252 );
253 // NOLINTEND
254
255public:
256 // destructor thunk
257 // NOLINTBEGIN
258 MCAPI void $dtor();
259 // NOLINTEND
260};
Definition BaseGameVersion.h:8
Definition Publisher.h:8
Definition BlockPos.h:18
Definition CompoundTag.h:13
Definition HashedString.h:5
Definition ILevelStorageManagerConnector.h:13
Definition Value.h:16
Definition LevelData.h:49
Definition LevelSeed64.h:5
Definition LevelSettings.h:37
Definition BitStream.h:7
Definition EduSharedUriResource.h:10
Definition LevelDataValue.h:5