2013-07-29 11:13:03 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-09 12:24:41 +00:00
|
|
|
// tolua_begin
|
2013-07-29 11:13:03 +00:00
|
|
|
class cFallingBlock :
|
|
|
|
public cEntity
|
|
|
|
{
|
2017-05-09 12:24:41 +00:00
|
|
|
// tolua_end
|
|
|
|
|
2020-04-13 16:38:06 +00:00
|
|
|
using Super = cEntity;
|
2019-09-29 12:59:24 +00:00
|
|
|
|
|
|
|
public: // tolua_export
|
|
|
|
|
2014-07-22 22:36:13 +00:00
|
|
|
CLASS_PROTODEF(cFallingBlock)
|
2013-07-29 11:13:03 +00:00
|
|
|
|
2019-09-29 12:59:24 +00:00
|
|
|
/** Creates a new falling block.
|
2020-04-09 20:25:20 +00:00
|
|
|
a_Position is expected in world coords */
|
|
|
|
cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
|
2013-07-29 11:13:03 +00:00
|
|
|
|
2017-05-09 12:24:41 +00:00
|
|
|
// tolua_begin
|
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
BLOCKTYPE GetBlockType(void) const { return m_BlockType; }
|
|
|
|
NIBBLETYPE GetBlockMeta(void) const { return m_BlockMeta; }
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2017-05-09 12:24:41 +00:00
|
|
|
// tolua_end
|
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
// cEntity overrides:
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2015-01-11 21:12:26 +00:00
|
|
|
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
private:
|
|
|
|
BLOCKTYPE m_BlockType;
|
|
|
|
NIBBLETYPE m_BlockMeta;
|
2017-05-09 12:24:41 +00:00
|
|
|
} ; // tolua_export
|
2013-07-29 11:13:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|