fix Keep alive
This commit is contained in:
@@ -4,12 +4,14 @@
|
|||||||
*/
|
*/
|
||||||
package mc.core.network.proto_125.packets;
|
package mc.core.network.proto_125.packets;
|
||||||
|
|
||||||
|
import mc.core.network.CSPacket;
|
||||||
|
import mc.core.network.NetStream;
|
||||||
import mc.core.network.SCPacket;
|
import mc.core.network.SCPacket;
|
||||||
import mc.core.network.proto_125.ByteArrayOutputNetStream;
|
import mc.core.network.proto_125.ByteArrayOutputNetStream;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class KeepAlivePacket implements SCPacket {
|
public class KeepAlivePacket implements SCPacket, CSPacket {
|
||||||
private static final Random rand = new Random();
|
private static final Random rand = new Random();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -18,4 +20,8 @@ public class KeepAlivePacket implements SCPacket {
|
|||||||
netStream.writeInt(rand.nextInt(Integer.MAX_VALUE));
|
netStream.writeInt(rand.nextInt(Integer.MAX_VALUE));
|
||||||
return netStream.toByteArray();
|
return netStream.toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readSelf(NetStream netStream) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user