From c2b43f33da1461939df43657752ffd3651933b6e Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 31 Oct 2011 21:30:14 +0000 Subject: Player data is saved and loaded as human readable JSON now. cFileFormatUpdate will loop through old files and convert them to new files (should replace legacy old format loading code) cItem has two new functions to load from Json and output Json, this will keep the items in Json standard ChestEntity and FurnaceEntity use the new functions in cItem git-svn-id: http://mc-server.googlecode.com/svn/trunk@35 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cItem.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/cItem.h') diff --git a/source/cItem.h b/source/cItem.h index edf3468ac..dde0c649b 100644 --- a/source/cItem.h +++ b/source/cItem.h @@ -3,6 +3,11 @@ #include "Defines.h" #include "BlockID.h" +namespace Json +{ + class Value; +}; + class cItem //tolua_export { //tolua_export public: @@ -27,6 +32,10 @@ public: { //tolua_export return ( (m_ItemID == a_Item.m_ItemID) && (m_ItemHealth == a_Item.m_ItemHealth) ); } //tolua_export + + void GetJson( Json::Value & a_OutValue ); //tolua_export + void FromJson( const Json::Value & a_Value ); //tolua_export + ENUM_ITEM_ID m_ItemID; //tolua_export char m_ItemCount; //tolua_export short m_ItemHealth; //tolua_export -- cgit v1.2.3