36 virtual
bool Tick(
std::chrono::milliseconds a_Dt,
cChunk & a_Chunk) override;
bool IsBeaconBlocked(void)
Is the beacon blocked by non-transparent blocks that are higher than the beacon?
eType
All types of entity effects (numbers correspond to protocol / storage types)
void SetBeaconLevel(char a_Level)
Modify the beacon level.
cBlockEntityWithItems(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, int a_ItemGridWidth, int a_ItemGridHeight, cWorld *a_World)
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...
void GiveEffects(void)
Give the near-players the effects.
unsigned char BLOCKTYPE
The datatype used by blockdata.
cEntityEffect::eType GetSecondaryEffect(void) const
cEntityEffect::eType m_SecondaryEffect
static bool IsMineralBlock(BLOCKTYPE a_BlockType)
Returns true if the block is a diamond block, a golden block, an iron block or an emerald block...
cEntityEffect::eType m_PrimaryEffect
char CalculatePyramidLevel(void)
Calculate the amount of layers the pyramid below the beacon has.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
void UpdateBeacon(void)
Update the beacon.
bool IsActive(void) const
Is the beacon active?
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
char GetBeaconLevel(void) const
Returns the beacon level.
static bool IsValidEffect(cEntityEffect::eType a_Effect, char a_BeaconLevel)
Returns true if the effect can be used.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
#define BLOCKENTITY_PROTODEF(classname)
Place this macro in the declaration of each cBlockEntity descendant.
bool SetSecondaryEffect(cEntityEffect::eType a_Effect)
Sets the secondary effect.
bool SetPrimaryEffect(cEntityEffect::eType a_Effect)
Sets the primary effect.
cEntityEffect::eType GetPrimaryEffect(void) const