diff options
author | andrew <xdotftw@gmail.com> | 2014-01-18 14:40:47 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-01-18 14:40:47 +0100 |
commit | be5299350a3b808ade39df7e9654eda47732e96e (patch) | |
tree | 0ab800ee34fc0489a9542ae3607383050bae7f8e /src/BlockEntities/CommandBlockEntity.cpp | |
parent | Basic command block implementation (diff) | |
download | cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar.gz cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar.bz2 cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar.lz cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar.xz cuberite-be5299350a3b808ade39df7e9654eda47732e96e.tar.zst cuberite-be5299350a3b808ade39df7e9654eda47732e96e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/CommandBlockEntity.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp index 6e371e0fe..88e55dece 100644 --- a/src/BlockEntities/CommandBlockEntity.cpp +++ b/src/BlockEntities/CommandBlockEntity.cpp @@ -45,7 +45,7 @@ void cCommandBlockEntity::UsedBy(cPlayer * a_Player) cWindow * Window = GetWindow(); if (Window == NULL) { - //OpenWindow(new cDropSpenserWindow(m_PosX, m_PosY, m_PosZ, this)); + //OpenWindow(new cDropSpenserWindow(m_PosX, m_PosY, m_PosZ, this)); FIXME Window = GetWindow(); } @@ -71,6 +71,24 @@ void cCommandBlockEntity::SetCommand(const AString & a_Cmd) +void cCommandBlockEntity::SetLastOutput(const AString & a_LastOut) +{ + m_LastOutput = a_LastOut; +} + + + + + +void cCommandBlockEntity::SetResult(const NIBBLETYPE a_Result) +{ + m_Result = a_Result; +} + + + + + const AString & cCommandBlockEntity::GetCommand(void) const { return m_Command; @@ -89,6 +107,15 @@ const AString & cCommandBlockEntity::GetLastOutput(void) const +NIBBLETYPE cCommandBlockEntity::GetResult(void) const +{ + return m_Result; +} + + + + + void cCommandBlockEntity::Activate(void) { m_ShouldExecute = true; @@ -164,8 +191,11 @@ void cCommandBlockEntity::SaveToJson(Json::Value & a_Value) void cCommandBlockEntity::Execute() { // TODO: Parse arguments and dispatch command + LOGD("Command: %s", m_Command.c_str()); + m_LastOutput = ""; + m_Result = 0; } |