1
0
cuberite-2a/src/Mobs/Enderman.h
Alexander Harkness 6309c6a97f
improve rain simulation (#4017)
* Uses vanilla logic to decide which blocks rain falls through.
 * Rain falls infinitely above the world, and stops at y=0.
 * Entities will now be extinguished if they are under rain-blocking
blocks, and fire will now be extinguished by rain similarly.
 * Create IsWeatherWetAtXYZ to identify wetness at a particular location. 
 * Use new code for enderman rain detection.
 * Fixes issue #916
 * Disable warnings for global constructors in the fire simulator.
2017-12-26 21:25:57 +00:00

40 lines
923 B
C++

#pragma once
#include "PassiveAggressiveMonster.h"
class cEnderman :
public cPassiveAggressiveMonster
{
typedef cPassiveAggressiveMonster super;
public:
cEnderman(void);
CLASS_PROTODEF(cEnderman)
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
virtual void CheckEventSeePlayer(cChunk & a_Chunk) override;
virtual void CheckEventLostPlayer(void) override;
virtual void EventLosePlayer(void) override;
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
bool IsScreaming(void) const {return m_bIsScreaming; }
BLOCKTYPE GetCarriedBlock(void) const {return CarriedBlock; }
NIBBLETYPE GetCarriedMeta(void) const {return CarriedMeta; }
/** Returns if the current sky light level is sufficient for the enderman to become aggravated */
bool CheckLight(void);
private:
bool m_bIsScreaming;
BLOCKTYPE CarriedBlock;
NIBBLETYPE CarriedMeta;
} ;