blob: 95a1aef19b4cc384e73a65b5be42aa2fe12665d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#pragma once
using namespace std;
#include "Mob.h"
#include "Enemy.h"
#include "ParticleTypes.h"
class Slime : public Mob, public Enemy
{
public:
eINSTANCEOF GetType() { return eTYPE_SLIME; }
static Entity *create(Level *level) { return new Slime(level); }
private:
static const int ID_SIZE = 16;
public:
float targetSquish;
float squish;
float oSquish;
private:
int jumpDelay;
void _init();
public:
Slime(Level *level);
protected:
virtual void defineSynchedData();
public:
using Mob::setSize;
virtual void setSize(int size);
virtual int getSize();
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void readAdditionalSaveData(CompoundTag *tag);
protected:
virtual ePARTICLE_TYPE getParticleName();
virtual int getSquishSound();
public:
virtual void tick();
protected:
virtual void serverAiStep();
virtual void decreaseSquish();
virtual int getJumpDelay();
virtual shared_ptr<Slime> createChild();
public:
virtual void remove();
virtual void playerTouch(shared_ptr<Player> player);
protected:
virtual bool isDealsDamage();
virtual int getAttackDamage();
virtual int getHurtSound();
virtual int getDeathSound();
virtual int getDeathLoot();
public:
virtual bool canSpawn();
protected:
virtual float getSoundVolume();
public:
virtual int getMaxHeadXRot();
protected:
virtual bool doPlayJumpSound();
virtual bool doPlayLandSound();
};
|