@Immutable public final class BedrockPacketCodec extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BedrockPacketCodec.Builder |
| Constructor and Description |
|---|
BedrockPacketCodec() |
| Modifier and Type | Method and Description |
|---|---|
static BedrockPacketCodec.Builder |
builder() |
int |
getId(BedrockPacket packet) |
int |
getId(Class<? extends BedrockPacket> clazz) |
BedrockPacketCodec.Builder |
toBuilder() |
BedrockPacket |
tryDecode(ByteBuf buf,
int id,
BedrockSession session) |
void |
tryEncode(ByteBuf buf,
BedrockPacket packet,
BedrockSession session) |
public static BedrockPacketCodec.Builder builder()
public BedrockPacket tryDecode(ByteBuf buf, int id, BedrockSession session) throws PacketSerializeException
PacketSerializeExceptionpublic void tryEncode(ByteBuf buf, BedrockPacket packet, BedrockSession session) throws PacketSerializeException
PacketSerializeExceptionpublic int getId(BedrockPacket packet)
public int getId(Class<? extends BedrockPacket> clazz)
public BedrockPacketCodec.Builder toBuilder()
Copyright © 2018–2021 NukkitX. All rights reserved.