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

#include "..\Minecraft.World\Entity.h"
#include "..\Minecraft.World\ParticleTypes.h"
#include "ParticleEngine.h"
class Tesselator;
class CompoundTag;
class Icon;

class Particle : public Entity
{
protected:
	int texX, texY;
    float uo, vo;
    int age;
    int lifetime;
    float size;
    float gravity;
    float rCol, gCol, bCol;
	float alpha;
    Icon *tex;
public:
	static double xOff, yOff, zOff;
private:
	void _init(Level *level, double x, double y, double z);
protected:
	Particle(Level *level, double x, double y, double z);
public:
    Particle(Level *level, double x, double y, double z, double xa, double ya, double za);
    virtual shared_ptr<Particle> setPower(float power);
    virtual shared_ptr<Particle> scale(float scale);
	void setColor(float r, float g, float b);
	void setAlpha(float alpha);
	float getRedCol();
	float getGreenCol();
	float getBlueCol();
	float getAlpha();
protected:
	virtual bool makeStepSound();
    virtual void defineSynchedData();
public:
	virtual void tick();
	virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2);
	virtual int getParticleTexture();
	virtual void addAdditonalSaveData(CompoundTag *entityTag);
	virtual void readAdditionalSaveData(CompoundTag *tag);
	virtual void setTex(Textures *textures, Icon *icon);
	virtual void setMiscTex(int slotIndex);
	virtual void setNextMiscAnimTex();
	virtual bool isAttackable();
	virtual wstring toString();
};