diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-10-20 13:28:45 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-10-24 19:49:38 +0200 |
commit | 6d85435f60e4fa94b1956ceb44c7dddd92c4b39b (patch) | |
tree | a5448788a6de6ff71039040bb31e0b5aaaa43f87 /src/BlockEntities/BlockEntity.h | |
parent | TNT Changes (#4970) (diff) | |
download | cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar.gz cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar.bz2 cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar.lz cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar.xz cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.tar.zst cuberite-6d85435f60e4fa94b1956ceb44c7dddd92c4b39b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/BlockEntity.h | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h index c133c186c..3355cdf44 100644 --- a/src/BlockEntities/BlockEntity.h +++ b/src/BlockEntities/BlockEntity.h @@ -5,27 +5,6 @@ -/** Place this macro in the declaration of each cBlockEntity descendant. */ -#define BLOCKENTITY_PROTODEF(classname) \ - virtual bool IsA(const char * a_ClassName) const override \ - { \ - return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \ - } \ - virtual const char * GetClass() const override \ - { \ - return #classname; \ - } \ - static const char * GetClassStatic() \ - { \ - return #classname; \ - } \ - virtual const char * GetParentClass() const override \ - { \ - return Super::GetClass(); \ - } - - - class cChunk; @@ -56,6 +35,7 @@ protected: } public: + // tolua_end virtual ~cBlockEntity() {} // force a virtual destructor in all descendants @@ -93,20 +73,6 @@ public: Super::CopyFrom(a_Src) to copy the common ones. */ virtual void CopyFrom(const cBlockEntity & a_Src); - static const char * GetClassStatic() // Needed for ManualBindings's ForEach templates - { - return "cBlockEntity"; - } - - /** Returns true if the object is the specified class, or its descendant. */ - virtual bool IsA(const char * a_ClassName) const { return (strcmp(a_ClassName, "cBlockEntity") == 0); } - - /** Returns the name of the topmost class (the most descendant). Used for Lua bindings to push the correct object type. */ - virtual const char * GetClass() const { return GetClassStatic(); } - - /** Returns the name of the parent class, or empty string if no parent class. */ - virtual const char * GetParentClass() const { return ""; } - // tolua_begin // Position, in absolute block coordinates: @@ -163,7 +129,3 @@ protected: cWorld * m_World; } ; // tolua_export - - - - |