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
41
42
43
44
45
46
47
48
|
package net.minecraft.server;
public class PacketPlayOutBlockChange extends Packet {
private int a;
private int b;
private int c;
public Block block; // CraftBukkit - public
public int data; // CraftBukkit - public
public PacketPlayOutBlockChange() {}
public PacketPlayOutBlockChange(int i, int j, int k, World world) {
this.a = i;
this.b = j;
this.c = k;
this.block = world.getType(i, j, k);
this.data = world.getData(i, j, k);
}
public void a(PacketDataSerializer packetdataserializer) {
this.a = packetdataserializer.readInt();
this.b = packetdataserializer.readUnsignedByte();
this.c = packetdataserializer.readInt();
this.block = Block.e(packetdataserializer.a());
this.data = packetdataserializer.readUnsignedByte();
}
public void b(PacketDataSerializer packetdataserializer) {
packetdataserializer.writeInt(this.a);
packetdataserializer.writeByte(this.b);
packetdataserializer.writeInt(this.c);
packetdataserializer.b(Block.b(this.block));
packetdataserializer.writeByte(this.data);
}
public void a(PacketPlayOutListener packetplayoutlistener) {
packetplayoutlistener.a(this);
}
public String b() {
return String.format("type=%d, data=%d, x=%d, y=%d, z=%d", new Object[] { Integer.valueOf(Block.b(this.block)), Integer.valueOf(this.data), Integer.valueOf(this.a), Integer.valueOf(this.b), Integer.valueOf(this.c)});
}
public void handle(PacketListener packetlistener) {
this.a((PacketPlayOutListener) packetlistener);
}
}
|