diff options
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; +}; |