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

#include "Entity.h"
#include "ParticleTypes.h"

class HitResult;

class Fireball : public Entity
{
public:
	eINSTANCEOF GetType() { return 	eTYPE_FIREBALL; }
	static Entity *create(Level *level) { return new Fireball(level); }

private:
	int xTile;
	int yTile;
	int zTile;
	int lastTile;

private:
	bool inGround;

public:
	shared_ptr<Mob> owner;

private:
	int life;
	int flightTime;

	// 4J - added common ctor code.
	void _init();

public:
	double xPower, yPower, zPower;

	Fireball(Level *level);

protected:
	virtual void defineSynchedData();

public:
	virtual bool shouldRenderAtSqrDistance(double distance);

	Fireball(Level *level, double x, double y, double z, double xa, double ya, double za);
	Fireball(Level *level, shared_ptr<Mob> mob, double xa, double ya, double za);

public:
	virtual void tick();

protected:
	virtual void onHit(HitResult *res);

public:
	virtual void addAdditonalSaveData(CompoundTag *tag);
	virtual void readAdditionalSaveData(CompoundTag *tag);
	virtual bool isPickable();
	virtual float getPickRadius();
	virtual bool hurt(DamageSource *source, int damage);
	virtual float getShadowHeightOffs();
	virtual float getBrightness(float a);
	virtual int getLightColor(float a);

	// 4J Added TU9
	virtual bool shouldBurn();
	virtual int getIcon();

protected:
// 4J Added TU9
	virtual ePARTICLE_TYPE getTrailParticleType();
};