diff options
author | Alexander Harkness <bearbin@gmail.com> | 2014-10-11 19:32:21 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2014-10-11 19:32:21 +0200 |
commit | 93833069a80fe4aec33a95148df39ad40671ddaf (patch) | |
tree | 2e6a335a60e618b5fe456ca8a586a2c5448c8c87 /src/BlockEntities/FlowerPotEntity.cpp | |
parent | Reverted submodule changes. (diff) | |
parent | Merge pull request #1528 from kjanku1/master (diff) | |
download | cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.gz cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.bz2 cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.lz cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.xz cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.zst cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.zip |
Diffstat (limited to 'src/BlockEntities/FlowerPotEntity.cpp')
-rw-r--r-- | src/BlockEntities/FlowerPotEntity.cpp | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/BlockEntities/FlowerPotEntity.cpp b/src/BlockEntities/FlowerPotEntity.cpp index 87bf8b921..01560f814 100644 --- a/src/BlockEntities/FlowerPotEntity.cpp +++ b/src/BlockEntities/FlowerPotEntity.cpp @@ -1,10 +1,9 @@ // FlowerPotEntity.cpp -// Implements the cFlowerPotEntity class representing a single sign in the world +// Implements the cFlowerPotEntity class representing a single flower pot in the world #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules -#include "json/json.h" #include "FlowerPotEntity.h" #include "../Entities/Player.h" #include "../Item.h" @@ -73,37 +72,6 @@ void cFlowerPotEntity::Destroy(void) -bool cFlowerPotEntity::LoadFromJson(const Json::Value & a_Value) -{ - m_PosX = a_Value.get("x", 0).asInt(); - m_PosY = a_Value.get("y", 0).asInt(); - m_PosZ = a_Value.get("z", 0).asInt(); - - m_Item = cItem(); - m_Item.FromJson(a_Value.get("Item", 0)); - - return true; -} - - - - - -void cFlowerPotEntity::SaveToJson(Json::Value & a_Value) -{ - a_Value["x"] = m_PosX; - a_Value["y"] = m_PosY; - a_Value["z"] = m_PosZ; - - Json::Value Item; - m_Item.GetJson(Item); - a_Value["Item"] = Item; -} - - - - - bool cFlowerPotEntity::IsFlower(short m_ItemType, short m_ItemData) { switch (m_ItemType) |