summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-03-15 03:47:55 +0100
committerGitHub <noreply@github.com>2021-03-15 03:47:55 +0100
commit243083e01a4b6b496ca4c0ed0a4a33499cd41936 (patch)
tree49f7149f1b765cad90cc1192dceca35e30530c8e /src/WorldStorage/NBTChunkSerializer.cpp
parentDerive HugeMushroom from the base handler (diff)
downloadcuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.gz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.bz2
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.lz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.xz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.zst
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 30e2a7815..7ce85616c 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -12,6 +12,7 @@
#include "../UUID.h"
#include "FastNBT.h"
+#include "../BlockEntities/BannerEntity.h"
#include "../BlockEntities/BeaconEntity.h"
#include "../BlockEntities/BedEntity.h"
#include "../BlockEntities/BrewingstandEntity.h"
@@ -205,6 +206,11 @@ public:
// Add tile-entity into NBT:
switch (a_Entity->GetBlockType())
{
+ // Banners:
+ case E_BLOCK_STANDING_BANNER:
+ case E_BLOCK_WALL_BANNER: AddBannerEntity (static_cast<cBannerEntity *> (a_Entity)); break;
+
+ // Others:
case E_BLOCK_BEACON: AddBeaconEntity (static_cast<cBeaconEntity *> (a_Entity)); break;
case E_BLOCK_BED: AddBedEntity (static_cast<cBedEntity *> (a_Entity)); break;
case E_BLOCK_BREWING_STAND: AddBrewingstandEntity (static_cast<cBrewingstandEntity *> (a_Entity)); break;
@@ -226,7 +232,6 @@ public:
case E_BLOCK_SIGN_POST: AddSignEntity (static_cast<cSignEntity *> (a_Entity)); break;
case E_BLOCK_TRAPPED_CHEST: AddChestEntity (static_cast<cChestEntity *> (a_Entity), a_Entity->GetBlockType()); break;
case E_BLOCK_WALLSIGN: AddSignEntity (static_cast<cSignEntity *> (a_Entity)); break;
-
default:
{
ASSERT(!"Unhandled block entity saved into Anvil");
@@ -366,6 +371,18 @@ public:
+ void AddBannerEntity(cBannerEntity * a_Entity)
+ {
+ mWriter.BeginCompound("");
+ AddBasicTileEntity(a_Entity,"Banner");
+ mWriter.AddInt("Base", static_cast<int>(a_Entity->GetBaseColor()));
+ mWriter.EndCompound();
+ }
+
+
+
+
+
void AddBeaconEntity(cBeaconEntity * a_Entity)
{
mWriter.BeginCompound("");