diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-08-05 22:48:23 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-08-05 22:48:23 +0200 |
commit | 06942871dde1388284a4fe222040720de3923b03 (patch) | |
tree | fb63be31f559ccb37ef0a05fd5148edef270fcfa /src/BlockEntities | |
parent | Fixed unsigned long comparison to size_t (diff) | |
download | cuberite-06942871dde1388284a4fe222040720de3923b03.tar cuberite-06942871dde1388284a4fe222040720de3923b03.tar.gz cuberite-06942871dde1388284a4fe222040720de3923b03.tar.bz2 cuberite-06942871dde1388284a4fe222040720de3923b03.tar.lz cuberite-06942871dde1388284a4fe222040720de3923b03.tar.xz cuberite-06942871dde1388284a4fe222040720de3923b03.tar.zst cuberite-06942871dde1388284a4fe222040720de3923b03.zip |
Diffstat (limited to 'src/BlockEntities')
-rw-r--r-- | src/BlockEntities/DropSpenserEntity.h | 7 | ||||
-rw-r--r-- | src/BlockEntities/RedstonePoweredEntity.h | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h index 9f58d0b07..dabe9a27b 100644 --- a/src/BlockEntities/DropSpenserEntity.h +++ b/src/BlockEntities/DropSpenserEntity.h @@ -11,7 +11,7 @@ #pragma once #include "BlockEntityWithItems.h" - +#include "RedstonePoweredEntity.h" @@ -30,7 +30,8 @@ class cServer; // tolua_begin class cDropSpenserEntity : - public cBlockEntityWithItems + public cBlockEntityWithItems, + public cRedstonePoweredEntity { typedef cBlockEntityWithItems super; @@ -65,7 +66,7 @@ public: void Activate(void); /// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate - void SetRedstonePower(bool a_IsPowered); + virtual void SetRedstonePower(bool a_IsPowered) override; // tolua_end diff --git a/src/BlockEntities/RedstonePoweredEntity.h b/src/BlockEntities/RedstonePoweredEntity.h new file mode 100644 index 000000000..aebba771f --- /dev/null +++ b/src/BlockEntities/RedstonePoweredEntity.h @@ -0,0 +1,9 @@ + + +// Interface class representing a blockEntity that responds to redstone +class cRedstonePoweredEntity +{ +public: +/// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate + virtual void SetRedstonePower(bool a_IsPowered) = 0; +}; |