34 virtual bool Tick(std::chrono::milliseconds a_Dt,
cChunk & a_Chunk)
override;
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
cBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
cCommandBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Creates a new empty command block entity.
const AString & GetLastOutput(void) const
Retrieves the last line of output generated by the command block.
void Activate(void)
Sets the command block to execute a command in the next tick.
void Execute()
Executes the associated command.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual bool Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Ticks the entity; returns true if the chunk should be marked as dirty as a result of this ticking.
NIBBLETYPE GetResult(void) const
Retrieves the result (signal strength) of the last operation.
void SetLastOutput(const AString &a_LastOut)
void SetResult(const NIBBLETYPE a_Result)
void SetCommand(const AString &a_Cmd)
Sets the command.
const AString & GetCommand(void) const
Retrieves stored command.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.