diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:40:40 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:40:40 +0200 |
commit | be121f9e80290fb3ad126a6f063784161e516fd0 (patch) | |
tree | 30c4fbf7db90e64c7df10e9b67882601dee4b355 /src/WorldStorage/NBTChunkSerializer.cpp | |
parent | WorldStorage: Removed unused callback parameters (diff) | |
download | cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar.gz cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar.bz2 cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar.lz cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar.xz cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.tar.zst cuberite-be121f9e80290fb3ad126a6f063784161e516fd0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/NBTChunkSerializer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 19936add2..51ca81663 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -18,6 +18,7 @@ #include "../BlockEntities/CommandBlockEntity.h" #include "../BlockEntities/DispenserEntity.h" #include "../BlockEntities/DropperEntity.h" +#include "../BlockEntities/EnderChestEntity.h" #include "../BlockEntities/FurnaceEntity.h" #include "../BlockEntities/HopperEntity.h" #include "../BlockEntities/JukeboxEntity.h" @@ -214,7 +215,7 @@ public: case E_BLOCK_COMMAND_BLOCK: AddCommandBlockEntity(static_cast<cCommandBlockEntity *>(a_Entity)); break; case E_BLOCK_DISPENSER: AddDispenserEntity (static_cast<cDispenserEntity *> (a_Entity)); break; case E_BLOCK_DROPPER: AddDropperEntity (static_cast<cDropperEntity *> (a_Entity)); break; - case E_BLOCK_ENDER_CHEST: /* No data to be saved */ break; + case E_BLOCK_ENDER_CHEST: AddEnderchestEntity (static_cast<cEnderChestEntity *> (a_Entity)); break; case E_BLOCK_FLOWER_POT: AddFlowerPotEntity (static_cast<cFlowerPotEntity *> (a_Entity)); break; case E_BLOCK_FURNACE: AddFurnaceEntity (static_cast<cFurnaceEntity *> (a_Entity)); break; case E_BLOCK_HEAD: AddMobHeadEntity (static_cast<cMobHeadEntity *> (a_Entity)); break; @@ -460,6 +461,17 @@ public: + void AddEnderchestEntity(cEnderChestEntity * a_Entity) + { + mWriter.BeginCompound(""); + AddBasicTileEntity(a_Entity, "EnderChest"); + mWriter.EndCompound(); + } + + + + + void AddFurnaceEntity(cFurnaceEntity * a_Furnace) { mWriter.BeginCompound(""); |