Cuberite
A lightweight, fast and extensible game server for Minecraft
PassiveMonster.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Monster.h"
5 #include "../UUID.h"
6 
7 
8 
9 
10 
12  public cMonster
13 {
14  using Super = cMonster;
15 
16 public:
17 
19  const AString & a_ConfigName,
20  eMonsterType a_MobType,
21  const AString & a_SoundHurt,
22  const AString & a_SoundDeath,
23  const AString & a_SoundAmbient,
24  float a_Width,
25  float a_Height
26  );
27 
28  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
29  virtual void OnRightClicked(cPlayer & a_Player) override;
30 
32  virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
33 };
eMonsterType
Identifies individual monster type.
Definition: MonsterTypes.h:11
std::string AString
Definition: StringUtils.h:11
Definition: Chunk.h:36
Definition: Entity.h:76
Definition: Player.h:29
cMonster(const AString &a_ConfigName, eMonsterType a_MobType, const AString &a_SoundHurt, const AString &a_SoundDeath, const AString &a_SoundAmbient, float a_Width, float a_Height)
Creates the mob object.
Definition: Monster.cpp:84
cPassiveMonster(const AString &a_ConfigName, eMonsterType a_MobType, const AString &a_SoundHurt, const AString &a_SoundDeath, const AString &a_SoundAmbient, float a_Width, float a_Height)
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
When hit by someone, run away.