diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 22:20:27 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 22:20:27 +0200 |
commit | 3dae696b414d9141b3faa6872f3723332b7b6395 (patch) | |
tree | 62bda337baa0c1754f54b4a010e3380f01bb5a4e /src/Root.cpp | |
parent | Inherit constructors, remove duplication (diff) | |
download | cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar.gz cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar.bz2 cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar.lz cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar.xz cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.tar.zst cuberite-3dae696b414d9141b3faa6872f3723332b7b6395.zip |
Diffstat (limited to 'src/Root.cpp')
-rw-r--r-- | src/Root.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index e2d4f71c3..8b8df817d 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -41,7 +41,6 @@ #include "Logger.h" #include "ClientHandle.h" #include "BlockTypePalette.h" -#include "Protocol/ProtocolPalettes.h" @@ -398,48 +397,6 @@ void cRoot::LoadGlobalSettings() -void cRoot::LoadPalettes(const AString & aProtocolFolder) -{ - LOG("Loading UpgradeBlockTypePalette..."); - try - { - auto paletteStr = cFile::ReadWholeFile(aProtocolFolder + cFile::PathSeparator() + "UpgradeBlockTypePalette.txt"); - if (paletteStr.empty()) - { - throw std::runtime_error("File is empty"); - } - m_UpgradeBlockTypePalette.reset(new BlockTypePalette); - m_UpgradeBlockTypePalette->loadFromString(paletteStr); - } - catch (const std::exception & exc) - { - LOGERROR("Failed to load the Upgrade block type palette from %s/UpgradeBlockTypePalette.txt: %s\nAborting", - aProtocolFolder, exc.what() - ); - throw; - } - - // Note: This can take a lot of time in MSVC debug builds - // If impatient, edit the settings.ini: [Folders] ProtocolPalettes=DummyDir; copy only one palette to DummyDir - LOG("Loading per-protocol palettes..."); - m_ProtocolPalettes.reset(new ProtocolPalettes); - m_ProtocolPalettes->load(aProtocolFolder); - auto versions = m_ProtocolPalettes->protocolVersions(); - if (versions.empty()) - { - LOGWARNING("No per-protocol palettes were loaded"); - } - else - { - std::sort(versions.begin(), versions.end()); - LOG("Loaded palettes for protocol versions: %s", StringJoin(versions, ", ")); - } -} - - - - - void cRoot::LoadWorlds(cDeadlockDetect & a_dd, cSettingsRepositoryInterface & a_Settings, bool a_IsNewIniFile) { if (a_IsNewIniFile) |