diff options
author | Lukas Pioch <lukas@zgow.de> | 2015-09-24 10:48:33 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2015-11-03 18:00:55 +0100 |
commit | 9749c3aac9dbfbc46a919193c97bb9c9e5339e03 (patch) | |
tree | 7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/WorldStorage/NBTChunkSerializer.cpp | |
parent | Merge pull request #2595 from cengizIO/master (diff) | |
download | cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.gz cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.bz2 cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.lz cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.xz cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.zst cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.zip |
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r-- | src/WorldStorage/NBTChunkSerializer.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index e2ba416c6..607a9c182 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -11,6 +11,7 @@ #include "FastNBT.h" #include "../BlockEntities/BeaconEntity.h" +#include "../BlockEntities/BrewingstandEntity.h" #include "../BlockEntities/ChestEntity.h" #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/DispenserEntity.h" @@ -196,6 +197,21 @@ void cNBTChunkSerializer::AddBeaconEntity(cBeaconEntity * a_Entity) +void cNBTChunkSerializer::AddBrewingstandEntity(cBrewingstandEntity * a_Brewingstand) +{ + m_Writer.BeginCompound(""); + AddBasicTileEntity(a_Brewingstand, "Brewingstand"); + m_Writer.BeginList("Items", TAG_Compound); + AddItemGrid(a_Brewingstand->GetContents()); + m_Writer.EndList(); + m_Writer.AddShort("BrewTime", a_Brewingstand->GetTimeBrewed()); + m_Writer.EndCompound(); +} + + + + + void cNBTChunkSerializer::AddChestEntity(cChestEntity * a_Entity, BLOCKTYPE a_ChestType) { m_Writer.BeginCompound(""); @@ -938,6 +954,7 @@ void cNBTChunkSerializer::BlockEntity(cBlockEntity * a_Entity) switch (a_Entity->GetBlockType()) { case E_BLOCK_BEACON: AddBeaconEntity (reinterpret_cast<cBeaconEntity *> (a_Entity)); break; + case E_BLOCK_BREWING_STAND: AddBrewingstandEntity(reinterpret_cast<cBrewingstandEntity *>(a_Entity)); break; case E_BLOCK_CHEST: AddChestEntity (reinterpret_cast<cChestEntity *> (a_Entity), a_Entity->GetBlockType()); break; case E_BLOCK_COMMAND_BLOCK: AddCommandBlockEntity(reinterpret_cast<cCommandBlockEntity *>(a_Entity)); break; case E_BLOCK_DISPENSER: AddDispenserEntity (reinterpret_cast<cDispenserEntity *> (a_Entity)); break; |