summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-04 09:56:57 +0200
committermadmaxoft <github@xoft.cz>2014-04-04 09:56:57 +0200
commit402d85d896c793644681c4bb2934a7e0abb5ed8c (patch)
tree1cf3fa3d08cf88829695f8d063e3132be3f9e9b9 /src/Items/ItemHandler.cpp
parentProtoProxy: Fixed a few Clang and MSVC warnings. (diff)
downloadcuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar.gz
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar.bz2
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar.lz
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar.xz
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.tar.zst
cuberite-402d85d896c793644681c4bb2934a7e0abb5ed8c.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemHandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 337b3a83c..1e77717e3 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -506,13 +506,13 @@ bool cItemHandler::GetPlacementBlockTypeMeta(
{
ASSERT(m_ItemType < 256); // Items with IDs above 255 should all be handled by specific handlers
- if (m_ItemType > 256)
+ if (m_ItemType >= 256)
{
- LOGERROR("%s: Item %d has no valid block!", __FUNCTION__, m_ItemType);
+ LOGERROR("%s: Item %d is not eligible for direct block placement!", __FUNCTION__, m_ItemType);
return false;
}
- cBlockHandler * BlockH = BlockHandler(m_ItemType);
+ cBlockHandler * BlockH = BlockHandler((BLOCKTYPE)m_ItemType);
cChunkInterface ChunkInterface(a_World->GetChunkMap());
return BlockH->GetPlacementBlockTypeMeta(
ChunkInterface, a_Player,