summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/EnchantmentSerializer.h
blob: 4dc75cb8695f95af387fd2ea72c7df74fb2cf46c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#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(const cEnchantments & 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);

};