summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/CommandBlockEntity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities/CommandBlockEntity.cpp')
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp32
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;
}