Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package net.minecraft.server;
2
3import java.io.DataInputStream;
4import java.io.DataOutputStream;
5import java.io.IOException;
6
7public class Packet34EntityTeleport extends Packet {
8
9 public int a;
10 public int b;
11 public int c;
12 public int d;
13 public byte e;
14 public byte f;
15
16 public Packet34EntityTeleport() {
17 }
18
19 public Packet34EntityTeleport(Entity entity) {
20 this.a = entity.id;
21 this.b = MathHelper.floor(entity.locX * 32.0D);
22 this.c = MathHelper.floor(entity.locY * 32.0D);
23 this.d = MathHelper.floor(entity.locZ * 32.0D);
24 this.e = (byte) ((int) (entity.yaw * 256.0F / 360.0F));
25 this.f = (byte) ((int) (entity.pitch * 256.0F / 360.0F));
26 }
27
28 public Packet34EntityTeleport(int i, int j, int k, int l, byte b0, byte b1) {
29 this.a = i;
30 this.b = j;
31 this.c = k;
32 this.d = l;
33 this.e = b0;
34 this.f = b1;
35 }
36
37 public void a(DataInputStream datainputstream) throws IOException {
38 this.a = datainputstream.readInt();
39 this.b = datainputstream.readInt();
40 this.c = datainputstream.readInt();
41 this.d = datainputstream.readInt();
42 this.e = (byte) datainputstream.read();
43 this.f = (byte) datainputstream.read();
44 }
45
46 public void a(DataOutputStream dataoutputstream) throws IOException {
47 dataoutputstream.writeInt(this.a);
48 dataoutputstream.writeInt(this.b);
49 dataoutputstream.writeInt(this.c);
50 dataoutputstream.writeInt(this.d);
51 dataoutputstream.write(this.e);
52 dataoutputstream.write(this.f);
53 }
54
55 public void a(NetHandler nethandler) {
56 nethandler.a(this);
57 }
58
59 public int a() {
60 return 34;
61 }
62}