diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-01-19 16:38:59 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-01-19 16:38:59 +0100 |
commit | e14ddff1c00919f1416bfa6da9568e2dff419559 (patch) | |
tree | e05c7c0e5219c165f0f9335726e00ebadab4440c /src/WorldStorage/EnchantmentSerializer.h | |
parent | Merge pull request #552 from worktycho/c++11 (diff) | |
download | cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar.gz cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar.bz2 cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar.lz cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar.xz cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.tar.zst cuberite-e14ddff1c00919f1416bfa6da9568e2dff419559.zip |
Diffstat (limited to 'src/WorldStorage/EnchantmentSerializer.h')
-rw-r--r-- | src/WorldStorage/EnchantmentSerializer.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/WorldStorage/EnchantmentSerializer.h b/src/WorldStorage/EnchantmentSerializer.h new file mode 100644 index 000000000..d616b0f62 --- /dev/null +++ b/src/WorldStorage/EnchantmentSerializer.h @@ -0,0 +1,17 @@ + +#pragma once + +#include "Enchantments.h" + +class cEnchantmentSerializer +{ + +public: + + /// Writes the enchantments into the specified NBT writer; begins with the LIST tag of the specified name ("ench" or "StoredEnchantments") + static void WriteToNBTCompound(cEnchantments const& a_Enchantments, cFastNBTWriter & a_Writer, const AString & a_ListTagName); + + /// Reads the enchantments from the specified NBT list tag (ench or StoredEnchantments) + static void ParseFromNBT(cEnchantments& a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx); + +}; |