Cuberite
A lightweight, fast and extensible game server for Minecraft
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
Mobs
Rabbit.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
PassiveMonster.h
"
5
6
7
8
9
10
enum class
eRabbitType
:
UInt8
11
{
12
Brown
= 0,
13
White
= 1,
14
Black
= 2,
15
BlackAndWhite
= 3,
16
Gold
= 4,
17
SaltAndPepper
= 5,
18
TheKillerBunny
= 99
19
};
20
21
22
23
24
25
class
cRabbit
:
26
public
cPassiveMonster
27
{
28
typedef
cPassiveMonster
super
;
29
30
public
:
31
cRabbit
();
32
cRabbit
(
eRabbitType
Type,
int
MoreCarrotTicks = 0);
33
34
CLASS_PROTODEF
(
cRabbit
)
35
36
virtual
void
GetDrops(
cItems
& a_Drops,
cEntity
* a_Killer =
nullptr
) override;
37
virtual
void
GetFollowedItems(
cItems
& a_Items)
override
38
{
39
a_Items.Add(
E_ITEM_CARROT
);
40
a_Items.Add(
E_ITEM_GOLDEN_CARROT
);
41
a_Items.Add(
E_BLOCK_DANDELION
);
42
}
43
44
eRabbitType
GetRabbitType
()
const
{
return
m_Type
; }
45
int
GetMoreCarrotTicks
()
const
{
return
m_MoreCarrotTicks; }
46
47
private
:
48
49
eRabbitType
m_Type
;
50
int
m_MoreCarrotTicks
;
// Ticks until the Rabbit eat planted Carrots
51
} ;
cRabbit::super
cPassiveMonster super
Definition:
Rabbit.h:28
cRabbit
Definition:
Rabbit.h:25
eRabbitType::SaltAndPepper
cRabbit::GetRabbitType
eRabbitType GetRabbitType() const
Definition:
Rabbit.h:44
E_BLOCK_DANDELION
Definition:
BlockID.h:46
eRabbitType
eRabbitType
Definition:
Rabbit.h:10
E_ITEM_CARROT
Definition:
BlockID.h:436
cRabbit::m_Type
eRabbitType m_Type
Definition:
Rabbit.h:49
PassiveMonster.h
eRabbitType::BlackAndWhite
eRabbitType::TheKillerBunny
cPassiveMonster
Definition:
PassiveMonster.h:10
eRabbitType::Gold
UInt8
unsigned char UInt8
Definition:
Globals.h:115
eRabbitType::Black
eRabbitType::Brown
cRabbit::m_MoreCarrotTicks
int m_MoreCarrotTicks
Definition:
Rabbit.h:50
cEntity
Definition:
Entity.h:73
m_Type
eMonsterType m_Type
Definition:
Monster.cpp:33
CLASS_PROTODEF
#define CLASS_PROTODEF(classname)
Definition:
Entity.h:11
E_ITEM_GOLDEN_CARROT
Definition:
BlockID.h:441
eRabbitType::White
cRabbit::GetMoreCarrotTicks
int GetMoreCarrotTicks() const
Definition:
Rabbit.h:45
cItems
This class bridges a vector of cItem for safe access via Lua.
Definition:
Item.h:234
Generated on Mon Feb 24 2020 09:04:16 for Cuberite by
1.8.11