aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/TileDestructionPacket.h
blob: 7650934904841ffa521de62115933b253ff6bb2b (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
#pragma once

#include "Packet.h"

class TileDestructionPacket : public Packet, public enable_shared_from_this<TileDestructionPacket>
{
private:
	int id;
	int x;
	int y;
	int z;
	int state;

public:
	TileDestructionPacket();
	TileDestructionPacket(int id, int x, int y, int z, int state);

	virtual void read(DataInputStream *dis);
	virtual void write(DataOutputStream *dos);
	virtual void handle(PacketListener *listener);
	virtual int getEstimatedSize();

	int getEntityId();
	int getX();
	int getY();
	int getZ();
	int getState();

	virtual bool canBeInvalidated();
	virtual bool isInvalidatedBy(shared_ptr<Packet> packet);

public:
	static shared_ptr<Packet> create() { return std::make_shared<TileDestructionPacket>(); }
	virtual int getId() { return 55; }
};