aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/PrimedTnt.h
blob: 0b65a5cae7836c905a043e5ec5b6efb77846a123 (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
#pragma once
#include "Entity.h"

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

public:
	static const int serialVersionUID = 0;

	int life;
	weak_ptr<LivingEntity> owner;

	void _init();

	PrimedTnt(Level *level);
	PrimedTnt(Level *level, double x, double y, double z, shared_ptr<LivingEntity> owner);

protected:
	virtual void defineSynchedData();
	virtual bool makeStepSound();

public:
	virtual bool isPickable();
	virtual void tick();

private:
	void explode();

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

public:
	virtual float getShadowHeightOffs();
	virtual shared_ptr<LivingEntity> getOwner();
};