summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-09-26 17:04:26 +0200
committerworktycho <work.tycho@gmail.com>2014-09-26 17:04:26 +0200
commit411c69b420acdc1e103a76a1a52e2c488aee5718 (patch)
tree06e33fb4b17d9c782ebb834a9821571f11ae103c /src/BlockEntities
parentImproved searching for spawn. (diff)
parentMerge branch 'master' into redstoneTests (diff)
downloadcuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar.gz
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar.bz2
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar.lz
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar.xz
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.tar.zst
cuberite-411c69b420acdc1e103a76a1a52e2c488aee5718.zip
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/CommandBlockEntity.h7
-rw-r--r--src/BlockEntities/DispenserEntity.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.h b/src/BlockEntities/CommandBlockEntity.h
index d02bf7d7b..22cd44322 100644
--- a/src/BlockEntities/CommandBlockEntity.h
+++ b/src/BlockEntities/CommandBlockEntity.h
@@ -10,7 +10,7 @@
#pragma once
#include "BlockEntity.h"
-
+#include "RedstonePoweredEntity.h"
@@ -27,7 +27,8 @@ namespace Json
// tolua_begin
class cCommandBlockEntity :
- public cBlockEntity
+ public cBlockEntity,
+ public cRedstonePoweredEntity
{
typedef cBlockEntity super;
@@ -52,7 +53,7 @@ public:
// tolua_begin
/// 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;
/// Sets the command block to execute a command in the next tick
void Activate(void);
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp
index f8830bf25..068891d66 100644
--- a/src/BlockEntities/DispenserEntity.cpp
+++ b/src/BlockEntities/DispenserEntity.cpp
@@ -109,7 +109,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
{
double MobX = 0.5 + (DispX + DispChunk->GetPosX() * cChunkDef::Width);
double MobZ = 0.5 + (DispZ + DispChunk->GetPosZ() * cChunkDef::Width);
- if (m_World->SpawnMob(MobX, DispY, MobZ, (cMonster::eType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0)
+ if (m_World->SpawnMob(MobX, DispY, MobZ, (eMonsterType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0)
{
m_Contents.ChangeSlotCount(a_SlotNum, -1);
}