summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/EnchantmentSerializer.h
blob: d616b0f626743182cab738b42ef1724c6c82b2f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
	
};