MCPcopy Create free account
hub / github.com/cuberite/cuberite / cWorld

Method cWorld

src/World.cpp:232–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230// cWorld:
231
232cWorld::cWorld(const AString & a_WorldName) :
233 m_WorldName(a_WorldName),
234 m_IniFileName(m_WorldName + "/world.ini"),
235 m_StorageSchema("Default"),
236#ifdef __arm__
237 m_StorageCompressionFactor(0),
238#else
239 m_StorageCompressionFactor(6),
240#endif
241 m_IsSpawnExplicitlySet(false),
242 m_WorldAgeSecs(0),
243 m_TimeOfDaySecs(0),
244 m_WorldAge(0),
245 m_TimeOfDay(0),
246 m_LastTimeUpdate(0),
247 m_SkyDarkness(0),
248 m_Weather(eWeather_Sunny),
249 m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :)
250 m_Scoreboard(this),
251 m_MapManager(this),
252 m_GeneratorCallbacks(*this),
253 m_TickThread(*this)
254{
255 LOGD("cWorld::cWorld(\"%s\")", a_WorldName.c_str());
256
257 cFile::CreateFolder(FILE_IO_PREFIX + m_WorldName);
258
259 // Load the scoreboard
260 cScoreboardSerializer Serializer(m_WorldName, &m_Scoreboard);
261 Serializer.Load();
262}
263
264
265

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
LoadMethod · 0.45

Tested by

no test coverage detected