From fe4253834919d6c742c59c701d3d5ce8285f4504 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 24 Jun 2017 11:58:06 +0200 Subject: cBlockArea supports block entities. (#3795) --- src/BlockEntities/BlockEntity.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/BlockEntities/BlockEntity.h') diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h index 6c69e8260..5b7184775 100644 --- a/src/BlockEntities/BlockEntity.h +++ b/src/BlockEntities/BlockEntity.h @@ -64,6 +64,14 @@ public: m_World = a_World; } + /** Updates the internally stored position. + Note that this should not ever be used for world-contained block entities, it is meant only for when BEs in a cBlockArea are manipulated. + Asserts when the block entity is assigned to a world. */ + void SetPos(int a_NewBlockX, int a_NewBlockY, int a_NewBlockZ); + + /** Returns true if the specified blocktype is supposed to have an associated block entity. */ + static bool IsBlockEntityBlockType(BLOCKTYPE a_BlockType); + /** Creates a new block entity for the specified block type If a_World is valid, then the entity is created bound to that world Returns nullptr for unknown block types. */ -- cgit v1.2.3