Add immediate packets w/ use packet type

This commit is contained in:
Sotr
2019-03-18 21:35:23 +08:00
parent 3b7adb3d4f
commit c554afae69
9 changed files with 163 additions and 12 deletions

View File

@@ -0,0 +1,37 @@
package net.minecraft.server;
import java.io.IOException;
public class PacketStatusOutPong implements Packet<PacketStatusOutListener> {
private long a;
public PacketStatusOutPong() {}
public PacketStatusOutPong(long i) {
this.a = i;
}
public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.readLong();
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.writeLong(this.a);
}
public void a(PacketStatusOutListener packetstatusoutlistener) {
packetstatusoutlistener.a(this);
}
// Akarin start
@Override
public io.akarin.server.core.PacketType getType() {
return io.akarin.server.core.PacketType.STATUS_OUT_PONG;
}
@Override
public boolean canDispatchImmediately() {
return true;
}
// Akarin end
}