summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BlockEntity.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/BlockEntities/BlockEntity.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/BlockEntities/BlockEntity.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/BlockEntities/BlockEntity.cpp b/src/BlockEntities/BlockEntity.cpp
index a3b6b33a3..4b17f10a6 100644
--- a/src/BlockEntities/BlockEntity.cpp
+++ b/src/BlockEntities/BlockEntity.cpp
@@ -4,6 +4,7 @@
// Implements the cBlockEntity class that is the common ancestor for all block entities
#include "Globals.h"
+#include "BannerEntity.h"
#include "BeaconEntity.h"
#include "BedEntity.h"
#include "BlockEntity.h"
@@ -77,6 +78,11 @@ OwnedBlockEntity cBlockEntity::CreateByBlockType(const BLOCKTYPE a_BlockType, co
{
switch (a_BlockType)
{
+ // Banners:
+ case E_BLOCK_STANDING_BANNER:
+ case E_BLOCK_WALL_BANNER: return std::make_unique<cBannerEntity >(a_BlockType, a_BlockMeta, a_Pos, a_World);
+
+ // Others:
case E_BLOCK_BEACON: return std::make_unique<cBeaconEntity >(a_BlockType, a_BlockMeta, a_Pos, a_World);
case E_BLOCK_BED: return std::make_unique<cBedEntity >(a_BlockType, a_BlockMeta, a_Pos, a_World);
case E_BLOCK_BREWING_STAND: return std::make_unique<cBrewingstandEntity >(a_BlockType, a_BlockMeta, a_Pos, a_World);
@@ -144,7 +150,9 @@ bool cBlockEntity::IsBlockEntityBlockType(const BLOCKTYPE a_BlockType)
case E_BLOCK_MOB_SPAWNER:
case E_BLOCK_NOTE_BLOCK:
case E_BLOCK_SIGN_POST:
+ case E_BLOCK_STANDING_BANNER:
case E_BLOCK_TRAPPED_CHEST:
+ case E_BLOCK_WALL_BANNER:
case E_BLOCK_WALLSIGN:
{
return true;