public abstract class Packet
extends java.lang.Object
| Constructor and Description |
|---|
Packet() |
| Modifier and Type | Method and Description |
|---|---|
static Packet |
generatePacket(com.google.common.collect.BiMap p_148839_0_,
int p_148839_1_)
Returns a packet instance, given the params: BiMap
|
boolean |
hasPriority()
If true, the network manager will process the packet immediately when received, otherwise it will queue it for
processing.
|
abstract void |
processPacket(INetHandler p_148833_1_)
Passes this Packet on to the NetHandler for processing.
|
static byte[] |
readBlob(io.netty.buffer.ByteBuf p_148834_0_)
Will read a byte array from the supplied ByteBuf, the first short encountered will be interpreted as the size of
the byte array to read in
|
abstract void |
readPacketData(PacketBuffer p_148837_1_)
Reads the raw packet data from the data stream.
|
java.lang.String |
serialize()
Returns a string formatted as comma separated [field]=[value] values.
|
java.lang.String |
toString() |
static void |
writeBlob(io.netty.buffer.ByteBuf p_148838_0_,
byte[] p_148838_1_)
Will write a byte array to supplied ByteBuf as a separately defined structure by prefixing the byte array with
its length
|
abstract void |
writePacketData(PacketBuffer p_148840_1_)
Writes the raw packet data to the data stream.
|
public static Packet generatePacket(com.google.common.collect.BiMap p_148839_0_, int p_148839_1_)
public static void writeBlob(io.netty.buffer.ByteBuf p_148838_0_,
byte[] p_148838_1_)
public static byte[] readBlob(io.netty.buffer.ByteBuf p_148834_0_)
throws java.io.IOException
java.io.IOExceptionpublic abstract void readPacketData(PacketBuffer p_148837_1_) throws java.io.IOException
java.io.IOExceptionpublic abstract void writePacketData(PacketBuffer p_148840_1_) throws java.io.IOException
java.io.IOExceptionpublic abstract void processPacket(INetHandler p_148833_1_)
public boolean hasPriority()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String serialize()