Cuberite
A lightweight, fast and extensible game server for Minecraft
src
Mobs
IronGolem.cpp
Go to the documentation of this file.
1
2
#include "
Globals.h
"
// NOTE: MSVC stupidness requires this to be the same across all modules
3
4
#include "
IronGolem.h
"
5
6
7
8
9
10
cIronGolem::cIronGolem
(
void
) :
11
Super
(
"IronGolem"
,
mtIronGolem
,
"entity.irongolem.hurt"
,
"entity.irongolem.death"
,
"entity.irongolem.ambient"
, 1.4f, 2.7f)
12
{
13
}
14
15
16
17
18
19
void
cIronGolem::GetDrops
(
cItems
& a_Drops,
cEntity
* a_Killer)
20
{
21
UNUSED
(a_Killer);
22
AddRandomDropItem
(a_Drops, 0, 5,
E_ITEM_IRON
);
23
AddRandomDropItem
(a_Drops, 0, 2,
E_BLOCK_FLOWER
);
24
}
25
26
27
28
E_BLOCK_FLOWER
@ E_BLOCK_FLOWER
Definition:
BlockType.h:48
E_ITEM_IRON
@ E_ITEM_IRON
Definition:
BlockType.h:309
Globals.h
UNUSED
#define UNUSED
Definition:
Globals.h:72
IronGolem.h
mtIronGolem
@ mtIronGolem
Definition:
MonsterTypes.h:38
cEntity
Definition:
Entity.h:76
cItems
This class bridges a vector of cItem for safe access via Lua.
Definition:
Item.h:215
cIronGolem::cIronGolem
cIronGolem()
Definition:
IronGolem.cpp:10
cIronGolem::GetDrops
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition:
IronGolem.cpp:19
cMonster::AddRandomDropItem
void AddRandomDropItem(cItems &a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth=0)
Adds a random number of a_Item between a_Min and a_Max to itemdrops a_Drops.
Definition:
Monster.cpp:1518
Generated on Fri Oct 25 2024 05:01:15 for Cuberite by
1.9.1