MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / reload

Method reload

launcher/minecraft/PackProfile.cpp:344–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void PackProfile::reload(Net::Mode netmode)
345{
346 // Do not reload when the update/resolve task is running. It is in control.
347 if(d->m_updateTask)
348 {
349 return;
350 }
351
352 // flush any scheduled saves to not lose state
353 saveNow();
354
355 // FIXME: differentiate when a reapply is required by propagating state from components
356 invalidateLaunchProfile();
357
358 if(load())
359 {
360 resolve(netmode);
361 }
362}
363
364Task::Ptr PackProfile::getCurrentTask()
365{

Callers 5

reloadSettingsMethod · 0.45
reloadPackProfileMethod · 0.45
executeTaskMethod · 0.45
executeTaskMethod · 0.45

Calls 1

loadFunction · 0.85

Tested by

no test coverage detected