diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-10-05 12:27:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 12:27:14 +0200 |
commit | a9031b6bae742b333b1b390192fa590f2ecb07ea (patch) | |
tree | b2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Blocks/BlockEntity.h | |
parent | Fixed current end generator (#4968) (diff) | |
download | cuberite-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 'src/Blocks/BlockEntity.h')
-rw-r--r-- | src/Blocks/BlockEntity.h | 22 |
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; +}; |