diff options
author | Mattes D <github@xoft.cz> | 2014-03-07 17:54:10 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-07 17:54:10 +0100 |
commit | f72c747b5005df8bc53a9e38e52fc47ceae8515c (patch) | |
tree | 6abf8ca1a3f2bd35c059bffe226b26a4c553e723 /src/WorldStorage/NBTChunkSerializer.cpp | |
parent | Fixed a typo. (diff) | |
parent | Link cItem in the documentation (diff) | |
download | cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar.gz cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar.bz2 cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar.lz cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar.xz cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.tar.zst cuberite-f72c747b5005df8bc53a9e38e52fc47ceae8515c.zip |
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r-- | src/WorldStorage/NBTChunkSerializer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index c1c659b36..6d0e29958 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -20,6 +20,7 @@ #include "../BlockEntities/NoteEntity.h" #include "../BlockEntities/SignEntity.h" #include "../BlockEntities/MobHeadEntity.h" +#include "../BlockEntities/FlowerPotEntity.h" #include "../Entities/Entity.h" #include "../Entities/FallingBlock.h" @@ -275,6 +276,19 @@ void cNBTChunkSerializer::AddMobHeadEntity(cMobHeadEntity * a_MobHead) +void cNBTChunkSerializer::AddFlowerPotEntity(cFlowerPotEntity * a_FlowerPot) +{ + m_Writer.BeginCompound(""); + AddBasicTileEntity(a_FlowerPot, "FlowerPot"); + m_Writer.AddInt ("Item", (Int32) a_FlowerPot->GetItem().m_ItemType); + m_Writer.AddInt ("Data", (Int32) a_FlowerPot->GetItem().m_ItemDamage); + m_Writer.EndCompound(); +} + + + + + void cNBTChunkSerializer::AddBasicEntity(cEntity * a_Entity, const AString & a_ClassName) { m_Writer.AddString("id", a_ClassName); @@ -687,6 +701,7 @@ void cNBTChunkSerializer::BlockEntity(cBlockEntity * a_Entity) case E_BLOCK_CHEST: AddChestEntity ((cChestEntity *) a_Entity); break; case E_BLOCK_DISPENSER: AddDispenserEntity ((cDispenserEntity *) a_Entity); break; case E_BLOCK_DROPPER: AddDropperEntity ((cDropperEntity *) a_Entity); break; + case E_BLOCK_FLOWER_POT: AddFlowerPotEntity ((cFlowerPotEntity *) a_Entity); break; case E_BLOCK_FURNACE: AddFurnaceEntity ((cFurnaceEntity *) a_Entity); break; case E_BLOCK_HOPPER: AddHopperEntity ((cHopperEntity *) a_Entity); break; case E_BLOCK_SIGN_POST: |