summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/EnchantmentSerializer.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-19 22:50:50 +0100
committerMattes D <github@xoft.cz>2014-01-19 22:50:50 +0100
commit865016abe2d879a00b93945dc4984341191995db (patch)
tree1833001d20b08a20dde0e56d59e0515827ab296e /src/WorldStorage/EnchantmentSerializer.h
parentMerge pull request #565 from mc-server/commandblockfixes (diff)
parentSwitched EnchantmentSerilizer to namespace (diff)
downloadcuberite-865016abe2d879a00b93945dc4984341191995db.tar
cuberite-865016abe2d879a00b93945dc4984341191995db.tar.gz
cuberite-865016abe2d879a00b93945dc4984341191995db.tar.bz2
cuberite-865016abe2d879a00b93945dc4984341191995db.tar.lz
cuberite-865016abe2d879a00b93945dc4984341191995db.tar.xz
cuberite-865016abe2d879a00b93945dc4984341191995db.tar.zst
cuberite-865016abe2d879a00b93945dc4984341191995db.zip
Diffstat (limited to 'src/WorldStorage/EnchantmentSerializer.h')
-rw-r--r--src/WorldStorage/EnchantmentSerializer.h17
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..9ed362900
--- /dev/null
+++ b/src/WorldStorage/EnchantmentSerializer.h
@@ -0,0 +1,17 @@
+
+#pragma once
+
+class cEnchantments;
+class cFastNBTWriter;
+class cParsedNBT;
+
+namespace EnchantmentSerializer
+{
+
+ /// Writes the enchantments into the specified NBT writer; begins with the LIST tag of the specified name ("ench" or "StoredEnchantments")
+ 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)
+ void ParseFromNBT(cEnchantments& a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx);
+
+};