summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BlockEntity.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-14 10:48:57 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-14 10:48:57 +0200
commit307e7aaff5c454b703db4d536c40d5715d96032b (patch)
treee217d6a073e6b87aaeb6618a933676d3251b9355 /src/BlockEntities/BlockEntity.cpp
parentUpdated compile.sh script (#4009) (diff)
downloadcuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.gz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.bz2
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.lz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.xz
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.tar.zst
cuberite-307e7aaff5c454b703db4d536c40d5715d96032b.zip
Diffstat (limited to 'src/BlockEntities/BlockEntity.cpp')
-rw-r--r--src/BlockEntities/BlockEntity.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/BlockEntities/BlockEntity.cpp b/src/BlockEntities/BlockEntity.cpp
index f2380734a..b83c5319f 100644
--- a/src/BlockEntities/BlockEntity.cpp
+++ b/src/BlockEntities/BlockEntity.cpp
@@ -64,8 +64,11 @@ bool cBlockEntity::IsBlockEntityBlockType(BLOCKTYPE a_BlockType)
{
return true;
}
+ default:
+ {
+ return false;
+ }
}
- return false;
}
@@ -95,12 +98,15 @@ cBlockEntity * cBlockEntity::CreateByBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE
case E_BLOCK_SIGN_POST: return new cSignEntity (a_BlockType, a_BlockMeta, a_BlockX, a_BlockY, a_BlockZ, a_World);
case E_BLOCK_TRAPPED_CHEST: return new cChestEntity (a_BlockType, a_BlockMeta, a_BlockX, a_BlockY, a_BlockZ, a_World);
case E_BLOCK_WALLSIGN: return new cSignEntity (a_BlockType, a_BlockMeta, a_BlockX, a_BlockY, a_BlockZ, a_World);
+ default:
+ {
+ LOGD("%s: Requesting creation of an unknown block entity - block type %d (%s)",
+ __FUNCTION__, a_BlockType, ItemTypeToString(a_BlockType).c_str()
+ );
+ ASSERT(!"Requesting creation of an unknown block entity");
+ return nullptr;
+ }
}
- LOGD("%s: Requesting creation of an unknown block entity - block type %d (%s)",
- __FUNCTION__, a_BlockType, ItemTypeToString(a_BlockType).c_str()
- );
- ASSERT(!"Requesting creation of an unknown block entity");
- return nullptr;
}