diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-03 22:06:43 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-03 22:06:43 +0100 |
commit | 1bc145ff44bee52d3b71812cc06ffe214f4ac216 (patch) | |
tree | 7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/WorldStorage/NBTChunkSerializer.cpp | |
parent | Merge pull request #2595 from cengizIO/master (diff) | |
parent | Implemented brewing (diff) | |
download | cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.gz cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.bz2 cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.lz cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.xz cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.zst cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.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; |