aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/PistonPieceEntity.h
blob: 8d8543ef72ab14232f12297744301c59e224fb00 (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
#include "TileEntity.h"

class PistonPieceEntity : public TileEntity
{
public:
	eINSTANCEOF GetType() { return eTYPE_PISTONPIECEENTITY; }
	static TileEntity *create() { return new PistonPieceEntity(); }
private:
	int id;
	int data;
	int facing;
	bool extending;
	bool _isSourcePiston;

	float progress, progressO;

public:
	PistonPieceEntity();
	PistonPieceEntity(int id, int data, int facing, bool extending, bool isSourcePiston);
	int getId();
	virtual int getData();
	bool isExtending();
	int getFacing();
	bool isSourcePiston();
	float getProgress(float a);
	float getXOff(float a);
	float getYOff(float a);
	float getZOff(float a);
private:
//	static List<Entity> collisionHolder = new ArrayList<Entity>();		// 4J - just using local vector for this now
	void moveCollidedEntities(float progress, float amount);
public:
	void finalTick();
	virtual void tick();
	virtual void load(CompoundTag *tag);
	virtual void save(CompoundTag *tag);

	// 4J Added
	shared_ptr<TileEntity> clone();
};