public enum NetworkDirection extends java.lang.Enum<NetworkDirection>
Enum Constant and Description |
---|
LOGIN_TO_CLIENT |
LOGIN_TO_SERVER |
PLAY_TO_CLIENT |
PLAY_TO_SERVER |
Modifier and Type | Method and Description |
---|---|
<T extends IPacket<?>> |
buildPacket(org.apache.commons.lang3.tuple.Pair<PacketBuffer,java.lang.Integer> packetData,
ResourceLocation channelName) |
static <T extends ICustomPacket<?>> |
directionFor(java.lang.Class<T> customPacket) |
NetworkEvent |
getEvent(ICustomPacket<?> buffer,
java.util.function.Supplier<NetworkEvent.Context> manager) |
LogicalSide |
getOriginationSide() |
LogicalSide |
getReceptionSide() |
NetworkDirection |
reply() |
static NetworkDirection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NetworkDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NetworkDirection PLAY_TO_SERVER
public static final NetworkDirection PLAY_TO_CLIENT
public static final NetworkDirection LOGIN_TO_SERVER
public static final NetworkDirection LOGIN_TO_CLIENT
public static NetworkDirection[] values()
for (NetworkDirection c : NetworkDirection.values()) System.out.println(c);
public static NetworkDirection 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 nullpublic static <T extends ICustomPacket<?>> NetworkDirection directionFor(java.lang.Class<T> customPacket)
public NetworkDirection reply()
public NetworkEvent getEvent(ICustomPacket<?> buffer, java.util.function.Supplier<NetworkEvent.Context> manager)
public LogicalSide getOriginationSide()
public LogicalSide getReceptionSide()
public <T extends IPacket<?>> ICustomPacket<T> buildPacket(org.apache.commons.lang3.tuple.Pair<PacketBuffer,java.lang.Integer> packetData, ResourceLocation channelName)