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