aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/SkullTileEntity.h
blob: 4b24457bc8e29a3aec16290b4dd74c3e72e226de (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

#include "TileEntity.h"

class SkullTileEntity : public TileEntity
{
public:
	eINSTANCEOF GetType() { return eTYPE_SKULLTILEENTITY; }
	static TileEntity *create() { return new SkullTileEntity(); }
public:
	static const int TYPE_SKELETON = 0;
	static const int TYPE_WITHER = 1;
	static const int TYPE_ZOMBIE = 2;
	static const int TYPE_CHAR = 3;
	static const int TYPE_CREEPER = 4;

private:
	int skullType;
	int rotation;
	wstring extraType;

public:
	SkullTileEntity();

	void save(CompoundTag *tag);
	void load(CompoundTag *tag);
	shared_ptr<Packet> getUpdatePacket();
	void setSkullType(int skullType, const wstring &extra);
	int getSkullType();
	int getRotation();
	void setRotation(int rot);
	wstring getExtraType();

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