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
|
#pragma once
using namespace std;
#include "Entity.h"
#include "ParticleTypes.h"
class HitResult;
class Fireball : public Entity
{
public:
eINSTANCEOF GetType() { return eTYPE_FIREBALL; }
private:
int xTile;
int yTile;
int zTile;
int lastTile;
private:
bool inGround;
public:
shared_ptr<LivingEntity> 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<LivingEntity> mob, double xa, double ya, double za);
public:
virtual void tick();
protected:
virtual float getInertia();
virtual void onHit(HitResult *res) = 0;
public:
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void readAdditionalSaveData(CompoundTag *tag);
virtual bool isPickable();
virtual float getPickRadius();
virtual bool hurt(DamageSource *source, float damage);
virtual float getShadowHeightOffs();
virtual float getBrightness(float a);
virtual int getLightColor(float a);
protected:
// 4J Added TU9
virtual ePARTICLE_TYPE getTrailParticleType();
virtual bool shouldBurn();
};
|