aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/PigZombie.h
blob: b47efacb4ca098c9ced4108a1d1e4375ffdbb10a (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
#pragma once
using namespace std;

#include "Zombie.h"

class DamageSource;

// SKIN BY XaPhobia Chris Beidler  
class PigZombie : public Zombie
{
public:
	eINSTANCEOF GetType() { return eTYPE_PIGZOMBIE; }
	static Entity *create(Level *level) { return new PigZombie(level); }

private:
	int angerTime;
    int playAngrySoundIn;

	void _init();

public:
	PigZombie(Level *level);

protected:
	bool useNewAi();

public:
	virtual int getTexture();
    virtual void tick();
    virtual bool canSpawn();
    virtual void addAdditonalSaveData(CompoundTag *tag);
    virtual void readAdditionalSaveData(CompoundTag *tag);

protected:
	virtual shared_ptr<Entity> findAttackTarget();

public:
    virtual bool hurt(DamageSource *source, int dmg);

private:
	void alert(shared_ptr<Entity> target);

protected:
	virtual int getAmbientSound();
	virtual int getHurtSound();
	virtual int getDeathSound();
	virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
	virtual void dropRareDeathLoot(int rareLootLevel);
    virtual int getDeathLoot();

private:
	static shared_ptr<ItemInstance> sword;

public:
	virtual void finalizeMobSpawn();

	shared_ptr<ItemInstance> getCarriedItem();

	static void staticCtor();
};