Archived
0

PingPacket -> KeepAlivePacket

This commit is contained in:
2021-05-09 17:00:25 +03:00
parent f10fb46d23
commit 8a6f37924e
4 changed files with 15 additions and 15 deletions

View File

@@ -4,7 +4,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import mc.protocol.packets.ClientSidePacket;
import mc.protocol.packets.Packet;
import mc.protocol.packets.PingPacket;
import mc.protocol.packets.KeepAlivePacket;
import mc.protocol.packets.ServerSidePacket;
import mc.protocol.packets.client.*;
import mc.protocol.packets.server.*;
@@ -24,12 +24,12 @@ public enum State {
// client side
Map.of(
0x00, StatusServerRequestPacket.class,
0x01, PingPacket.class
0x01, KeepAlivePacket.class
),
// server side
Map.of(
StatusServerResponse.class, 0x00,
PingPacket.class, 0x01
KeepAlivePacket.class, 0x01
)
),
LOGIN(2,
@@ -47,7 +47,7 @@ public enum State {
0x00, TeleportConfirmPacket.class,
0x04, ClientSettingsPacket.class,
0x09, PluginMessagePacket.class,
0x0B, PingPacket.class,
0x0B, KeepAlivePacket.class,
0x0D, PlayerPositionPacket.class,
0x0E, CPlayerPositionAndLookPacket.class,
0x0F, PlayerLookPacket.class,
@@ -55,7 +55,7 @@ public enum State {
),
// client bound
Map.of(
PingPacket.class, 0x1F,
KeepAlivePacket.class, 0x1F,
ChunkDataPacket.class, 0x20,
JoinGamePacket.class, 0x23,
PlayerAbilitiesPacket.class,0x2C,

View File

@@ -25,7 +25,7 @@ import mc.protocol.io.NetByteBuf;
* @see <a href="https://wiki.vg/index.php?title=Protocol&oldid=7368#Keep_Alive">Keep Alive</a>
*/
@Data
public class PingPacket implements ClientSidePacket, ServerSidePacket {
public class KeepAlivePacket implements ClientSidePacket, ServerSidePacket {
private Long payload;