2013-07-29 12:13:03 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-09 14:24:41 +02:00
|
|
|
// tolua_begin
|
2013-07-29 12:13:03 +01:00
|
|
|
class cFallingBlock :
|
|
|
|
|
public cEntity
|
|
|
|
|
{
|
2017-05-09 14:24:41 +02:00
|
|
|
// tolua_end
|
|
|
|
|
|
2020-04-13 18:38:06 +02:00
|
|
|
using Super = cEntity;
|
2019-09-29 14:59:24 +02:00
|
|
|
|
|
|
|
|
public: // tolua_export
|
|
|
|
|
|
2014-07-22 15:36:13 -07:00
|
|
|
CLASS_PROTODEF(cFallingBlock)
|
2013-07-29 12:13:03 +01:00
|
|
|
|
2019-09-29 14:59:24 +02:00
|
|
|
/** Creates a new falling block.
|
2020-04-09 22:25:20 +02:00
|
|
|
a_Position is expected in world coords */
|
|
|
|
|
cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
|
2013-07-29 12:13:03 +01:00
|
|
|
|
2017-05-09 14:24:41 +02:00
|
|
|
// tolua_begin
|
|
|
|
|
|
2013-07-29 12:13:03 +01:00
|
|
|
BLOCKTYPE GetBlockType(void) const { return m_BlockType; }
|
|
|
|
|
NIBBLETYPE GetBlockMeta(void) const { return m_BlockMeta; }
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2017-05-09 14:24:41 +02:00
|
|
|
// tolua_end
|
|
|
|
|
|
2013-07-29 12:13:03 +01: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 23:45:45 +02:00
|
|
|
|
2013-07-29 12:13:03 +01:00
|
|
|
private:
|
|
|
|
|
BLOCKTYPE m_BlockType;
|
|
|
|
|
NIBBLETYPE m_BlockMeta;
|
2017-05-09 14:24:41 +02:00
|
|
|
} ; // tolua_export
|
2013-07-29 12:13:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|