diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-28 15:40:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 15:40:57 +0200 |
commit | 748b121703fa28b10933f4432c09391e66179118 (patch) | |
tree | 58a39b6a75c3e9127507bf3c185a99e546147276 /src/BlockEntities/CommandBlockEntity.cpp | |
parent | Fix Windows XP to 7 compatibility (#5167) (diff) | |
download | cuberite-748b121703fa28b10933f4432c09391e66179118.tar cuberite-748b121703fa28b10933f4432c09391e66179118.tar.gz cuberite-748b121703fa28b10933f4432c09391e66179118.tar.bz2 cuberite-748b121703fa28b10933f4432c09391e66179118.tar.lz cuberite-748b121703fa28b10933f4432c09391e66179118.tar.xz cuberite-748b121703fa28b10933f4432c09391e66179118.tar.zst cuberite-748b121703fa28b10933f4432c09391e66179118.zip |
Diffstat (limited to 'src/BlockEntities/CommandBlockEntity.cpp')
-rw-r--r-- | src/BlockEntities/CommandBlockEntity.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp index c1e2cd430..34b0fd5f5 100644 --- a/src/BlockEntities/CommandBlockEntity.cpp +++ b/src/BlockEntities/CommandBlockEntity.cpp @@ -43,15 +43,6 @@ bool cCommandBlockEntity::UsedBy(cPlayer * a_Player) void cCommandBlockEntity::SetCommand(const AString & a_Cmd) { m_Command = a_Cmd; - - /* - Vanilla requires that the server send a Block Entity Update after a command has been set - Therefore, command blocks don't support on-the-fly (when window is open) updating of a command and therefore... - ...the following code can't be put in UsedBy just before the window opens - - Just documenting my experience in getting this to work :P - */ - m_World->BroadcastBlockEntity(GetPos()); } @@ -60,7 +51,6 @@ void cCommandBlockEntity::SetCommand(const AString & a_Cmd) void cCommandBlockEntity::SetLastOutput(const AString & a_LastOut) { - m_World->BroadcastBlockEntity(GetPos()); m_LastOutput = a_LastOut; } @@ -180,7 +170,6 @@ void cCommandBlockEntity::Execute() { // Overwrite field m_CmdBlock->SetLastOutput(cClientHandle::FormatChatPrefix(m_CmdBlock->GetWorld()->ShouldUseChatPrefixes(), "SUCCESS", cChatColor::Green, cChatColor::White) + a_Text); - m_CmdBlock->GetWorld()->BroadcastBlockEntity(m_CmdBlock->GetPos()); } }; |