@Immutable public final class BedrockPacketCodec extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BedrockPacketCodec.Builder |
| Constructor and Description |
|---|
BedrockPacketCodec(int protocolVersion,
String minecraftVersion,
PacketSerializer<BedrockPacket>[] serializers,
TIntHashBiMap<Class<? extends BedrockPacket>> idBiMap,
PacketSerializer<PacketHeader> headerSerializer) |
| Modifier and Type | Method and Description |
|---|---|
static BedrockPacketCodec.Builder |
builder() |
int |
getId(Class<? extends BedrockPacket> clazz) |
String |
getMinecraftVersion() |
int |
getProtocolVersion() |
BedrockPacket |
tryDecode(ByteBuf buf) |
ByteBuf |
tryEncode(BedrockPacket packet) |
public BedrockPacketCodec(int protocolVersion,
String minecraftVersion,
PacketSerializer<BedrockPacket>[] serializers,
TIntHashBiMap<Class<? extends BedrockPacket>> idBiMap,
PacketSerializer<PacketHeader> headerSerializer)
public static BedrockPacketCodec.Builder builder()
public BedrockPacket tryDecode(ByteBuf buf) throws PacketSerializeException
PacketSerializeExceptionpublic ByteBuf tryEncode(BedrockPacket packet) throws PacketSerializeException
PacketSerializeExceptionpublic int getId(Class<? extends BedrockPacket> clazz)
public int getProtocolVersion()
public String getMinecraftVersion()
Copyright © 2018–2019 NukkitX. All rights reserved.