blob: 38e09286b905490a9ac13afa9e7c1055ba7cc2be (
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
|
#pragma once
using namespace std;
#include "Packet.h"
class TeleportEntityPacket : public Packet, public enable_shared_from_this<TeleportEntityPacket>
{
public:
int id;
int x, y, z;
byte yRot, xRot;
TeleportEntityPacket();
TeleportEntityPacket(shared_ptr<Entity> e);
TeleportEntityPacket(int id, int x, int y, int z, byte yRot, byte xRot);
virtual void read(DataInputStream *dis);
virtual void write(DataOutputStream *dos);
virtual void handle(PacketListener *listener);
virtual int getEstimatedSize();
virtual bool canBeInvalidated();
virtual bool isInvalidatedBy(shared_ptr<Packet> packet);
public:
static shared_ptr<Packet> create() { return std::make_shared<TeleportEntityPacket>(); }
virtual int getId() { return 34; }
};
|