public enum ProtocolType extends java.lang.Enum<ProtocolType>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ProtocolType.PacketList<T extends INetHandler> |
(package private) static class |
ProtocolType.PacketRegistry |
Enum Constant and Description |
---|
HANDSHAKING |
LOGIN |
PLAY |
STATUS |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<PacketDirection,? extends ProtocolType.PacketList<?>> |
field_229711_h_ |
private int |
id |
private static java.util.Map<java.lang.Class<? extends IPacket<?>>,ProtocolType> |
STATES_BY_CLASS |
private static ProtocolType[] |
STATES_BY_ID |
Modifier and Type | Method and Description |
---|---|
private static ProtocolType.PacketRegistry |
func_229714_b_() |
static ProtocolType |
getById(int stateId) |
static ProtocolType |
getFromPacket(IPacket<?> packetIn) |
int |
getId() |
IPacket<?> |
getPacket(PacketDirection direction,
int packetId) |
java.lang.Integer |
getPacketId(PacketDirection direction,
IPacket<?> packetIn) |
static ProtocolType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ProtocolType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ProtocolType HANDSHAKING
public static final ProtocolType PLAY
public static final ProtocolType STATUS
public static final ProtocolType LOGIN
private static final ProtocolType[] STATES_BY_ID
private static final java.util.Map<java.lang.Class<? extends IPacket<?>>,ProtocolType> STATES_BY_CLASS
private final int id
private final java.util.Map<PacketDirection,? extends ProtocolType.PacketList<?>> field_229711_h_
public static ProtocolType[] values()
for (ProtocolType c : ProtocolType.values()) System.out.println(c);
public static ProtocolType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprivate static ProtocolType.PacketRegistry func_229714_b_()
@Nullable public java.lang.Integer getPacketId(PacketDirection direction, IPacket<?> packetIn)
@Nullable public IPacket<?> getPacket(PacketDirection direction, int packetId)
public int getId()
@Nullable public static ProtocolType getById(int stateId)
public static ProtocolType getFromPacket(IPacket<?> packetIn)