Cuberite
A lightweight, fast and extensible game server for Minecraft
MagmaCube.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "AggressiveMonster.h"
4 
5 
6 
7 
8 
9 class cMagmaCube:
10  public cAggressiveMonster
11 {
13 
14 public:
15 
17  cMagmaCube(int a_Size);
18 
20 
21  int GetSize(void) const { return m_Size; }
22 
25  static AString GetSizeName(int a_Size);
26 
27 private:
28 
29  virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
30  virtual bool IsNetherNative(void) override { return true; }
31 
33  int m_Size;
34 } ;
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
std::string AString
Definition: StringUtils.h:11
Definition: Entity.h:76
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:215
cAggressiveMonster(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)
cMagmaCube(int a_Size)
Creates a MagmaCube of the specified size; with 1 being the smallest.
Definition: MagmaCube.cpp:9
virtual bool IsNetherNative(void) override
Returns whether this mob spawns in the Nether in Vanilla.
Definition: MagmaCube.h:30
int m_Size
Size of the MagmaCube, with 1 being the smallest.
Definition: MagmaCube.h:33
int GetSize(void) const
Definition: MagmaCube.h:21
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition: MagmaCube.cpp:40
static AString GetSizeName(int a_Size)
Returns the text describing the slime's size, as used by the client's resource subsystem for sounds.
Definition: MagmaCube.cpp:27