summaryrefslogtreecommitdiffstats
path: root/src/Root.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-01-02 15:11:49 +0100
committerMattes D <github@xoft.cz>2020-01-07 06:53:17 +0100
commitb63bb2f694af8a0d6ef698534b1cf02a62514940 (patch)
treec9b300f0bbfc438514857c16484fa922d8c1e026 /src/Root.h
parentmain: Terminate if an exception is thrown. (diff)
downloadcuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar.gz
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar.bz2
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar.lz
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar.xz
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.tar.zst
cuberite-b63bb2f694af8a0d6ef698534b1cf02a62514940.zip
Diffstat (limited to 'src/Root.h')
-rw-r--r--src/Root.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Root.h b/src/Root.h
index 169a78194..1d3a6a347 100644
--- a/src/Root.h
+++ b/src/Root.h
@@ -28,6 +28,7 @@ class cCompositeChat;
class cSettingsRepositoryInterface;
class cDeadlockDetect;
class cUUID;
+class BlockTypePalette;
using cPlayerListCallback = cFunctionRef<bool(cPlayer &)>;
using cWorldListCallback = cFunctionRef<bool(cWorld &)>;
@@ -92,6 +93,9 @@ public:
/** Returns the (read-write) storage for registered block types. */
BlockTypeRegistry & GetBlockTypeRegistry() { return m_BlockTypeRegistry; }
+ /** Returns the block type palette used for upgrading blocks from pre-1.13 data. */
+ const BlockTypePalette & GetUpgradeBlockTypePalette() const { return *m_UpgradeBlockTypePalette; }
+
/** Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel */
static int GetFurnaceFuelBurnTime(const cItem & a_Fuel); // tolua_export
@@ -234,6 +238,9 @@ private:
/** The storage for all registered block types. */
BlockTypeRegistry m_BlockTypeRegistry;
+ /** The upgrade palette for pre-1.13 blocks. */
+ std::unique_ptr<BlockTypePalette> m_UpgradeBlockTypePalette;
+
void LoadGlobalSettings();