summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-19 16:38:59 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-19 16:38:59 +0100
commite14ddff1c00919f1416bfa6da9568e2dff419559 (patch)
treee05c7c0e5219c165f0f9335726e00ebadab4440c /src/Protocol/Protocol17x.cpp
parentMerge pull request #552 from worktycho/c++11 (diff)
downloadcuberite-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/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 5b3a79555..44db659a5 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -16,6 +16,7 @@ Implements the 1.7.x protocol classes:
#include "../Server.h"
#include "../World.h"
#include "../WorldStorage/FastNBT.h"
+#include "../WorldStorage/EnchantmentSerializer.h"
#include "../StringCompression.h"
#include "../Entities/ExpOrb.h"
#include "../Entities/Minecart.h"
@@ -1696,7 +1697,7 @@ void cProtocol172::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
)
)
{
- a_Item.m_Enchantments.ParseFromNBT(NBT, tag);
+ cEnchantmentSerializer::ParseFromNBT(a_Item.m_Enchantments, NBT, tag);
}
else if ((NBT.GetType(tag) == TAG_Compound) && (NBT.GetName(tag) == "display")) // Custom name and lore tag
{
@@ -1781,7 +1782,7 @@ void cProtocol172::cPacketizer::WriteItem(const cItem & a_Item)
if (!a_Item.m_Enchantments.IsEmpty())
{
const char * TagName = (a_Item.m_ItemType == E_ITEM_BOOK) ? "StoredEnchantments" : "ench";
- a_Item.m_Enchantments.WriteToNBTCompound(Writer, TagName);
+ cEnchantmentSerializer::WriteToNBTCompound(a_Item.m_Enchantments,Writer, TagName);
}
if (!a_Item.IsBothNameAndLoreEmpty())
{