diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-29 12:36:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-29 12:36:38 +0200 |
commit | dde641ce83de474187102f0efbbced826673f54d (patch) | |
tree | cfa07264ef4762567c3ebf504e368e3c330ad6fc /src/WorldStorage/NBTChunkSerializer.cpp | |
parent | Merge pull request #1136 from Howaner/GlobalFixes (diff) | |
download | cuberite-dde641ce83de474187102f0efbbced826673f54d.tar cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.gz cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.bz2 cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.lz cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.xz cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.zst cuberite-dde641ce83de474187102f0efbbced826673f54d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/NBTChunkSerializer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index f35b38859..baf74d830 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -11,6 +11,7 @@ #include "FastNBT.h" #include "../BlockEntities/ChestEntity.h" +#include "../BlockEntities/EnderChestEntity.h" #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/DispenserEntity.h" #include "../BlockEntities/DropperEntity.h" @@ -189,6 +190,18 @@ void cNBTChunkSerializer::AddChestEntity(cChestEntity * a_Entity) +void cNBTChunkSerializer::AddEnderChestEntity(cEnderChestEntity * a_Entity) +{ + m_Writer.BeginCompound(""); + AddBasicTileEntity(a_Entity, "EnderChest"); + // No need to store anything more + m_Writer.EndCompound(); +} + + + + + void cNBTChunkSerializer::AddDispenserEntity(cDispenserEntity * a_Entity) { m_Writer.BeginCompound(""); @@ -820,6 +833,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_ENDER_CHEST: AddEnderChestEntity ((cEnderChestEntity *) 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; |