public class PacketRegistry
extends java.lang.Object
Constructor and Description |
---|
PacketRegistry() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.lang.Integer> |
getClientPackets()
Retrieve every known and supported client packet.
|
static java.util.Map<java.lang.Integer,java.lang.Class> |
getOverwrittenPackets()
Retrieve the injected proxy classes handlig each packet ID.
|
static java.lang.Class |
getPacketClassFromID(int packetID)
Retrieves the correct packet class from a given packet ID.
|
static java.lang.Class |
getPacketClassFromID(int packetID,
boolean forceVanilla)
Retrieves the correct packet class from a given packet ID.
|
static int |
getPacketID(java.lang.Class<?> packet)
Retrieve the packet ID of a given packet.
|
static java.util.Map<java.lang.Class,java.lang.Integer> |
getPacketToID() |
static java.util.Map<java.lang.Integer,java.lang.Class> |
getPreviousPackets()
Retrieve the vanilla classes handling each packet ID.
|
static java.util.Set<java.lang.Integer> |
getServerPackets()
Retrieve every known and supported server packet.
|
public static java.util.Map<java.lang.Class,java.lang.Integer> getPacketToID()
public static java.util.Map<java.lang.Integer,java.lang.Class> getOverwrittenPackets()
public static java.util.Map<java.lang.Integer,java.lang.Class> getPreviousPackets()
public static java.util.Set<java.lang.Integer> getServerPackets() throws FieldAccessException
FieldAccessException
- If we're unable to retrieve the server packet data from Minecraft.public static java.util.Set<java.lang.Integer> getClientPackets() throws FieldAccessException
FieldAccessException
- If we're unable to retrieve the client packet data from Minecraft.public static java.lang.Class getPacketClassFromID(int packetID)
packetID
- - the packet ID.public static java.lang.Class getPacketClassFromID(int packetID, boolean forceVanilla)
packetID
- - the packet ID.forceVanilla
- - whether or not to look for vanilla classes, not injected classes.public static int getPacketID(java.lang.Class<?> packet)
packet
- - the type of packet to check.java.lang.IllegalArgumentException
- If this is not a valid packet.