aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LightningBolt.h
blob: 2a14e88a157f5fcf24f94bd45fd89c2773f5fbee (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
#pragma once
using namespace std;
#include "GlobalEntity.h"
#include "net.minecraft.world.level.tile.h"


//class LightningBolt : public GlobalEntity
class LightningBolt : public GlobalEntity
{
public:
	eINSTANCEOF GetType() { return eTYPE_LIGHTNINGBOLT; }

private:
	static const int START_LIFE = 2;

	int life;

public:
	int64_t seed;

private:
	int flashes;

public:
	LightningBolt(Level *level, double x, double y, double z);
	virtual void tick();

protected:
	virtual void defineSynchedData();
	virtual void readAdditionalSaveData(CompoundTag *tag);
	virtual void addAdditonalSaveData(CompoundTag *tag);

public:
	bool shouldAlwaysRender();
	virtual bool shouldRender(Vec3 *c);
};