summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockEntity.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-10-05 12:27:14 +0200
committerGitHub <noreply@github.com>2020-10-05 12:27:14 +0200
commita9031b6bae742b333b1b390192fa590f2ecb07ea (patch)
treeb2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Blocks/BlockEntity.h
parentFixed current end generator (#4968) (diff)
downloadcuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockEntity.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/Blocks/BlockEntity.h b/src/Blocks/BlockEntity.h
index 4b9de1f12..c10f5d769 100644
--- a/src/Blocks/BlockEntity.h
+++ b/src/Blocks/BlockEntity.h
@@ -11,7 +11,7 @@
/** Wrapper for blocks that have a cBlockEntity descendant attached to them and can be "used" by the player.
Forwards the "use" event to the block entity. */
-class cBlockEntityHandler:
+class cBlockEntityHandler :
public cBlockHandler
{
using Super = cBlockHandler;
@@ -20,6 +20,10 @@ public:
using Super::Super;
+protected:
+
+ ~cBlockEntityHandler() = default;
+
private:
virtual bool OnUse(
@@ -34,12 +38,20 @@ private:
return a_ChunkInterface.UseBlockEntity(&a_Player, a_BlockPos.x, a_BlockPos.y, a_BlockPos.z);
}
-
-
-
-
virtual bool IsUseable() const override
{
return true;
}
};
+
+
+
+
+
+class cDefaultBlockEntityHandler final :
+ public cBlockEntityHandler
+{
+public:
+
+ using cBlockEntityHandler::cBlockEntityHandler;
+};