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 | Field and Description |
---|---|
private java.util.function.BiFunction<ICustomPacket<?>,java.util.function.Supplier<NetworkEvent.Context>,NetworkEvent> |
eventSupplier |
private LogicalSide |
logicalSide |
private int |
otherWay |
private java.lang.Class<? extends IPacket> |
packetClass |
private static it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<java.lang.Class<? extends IPacket>,NetworkDirection> |
packetLookup |
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() |
private java.lang.Class<? extends IPacket> |
getPacketClass() |
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
private final java.util.function.BiFunction<ICustomPacket<?>,java.util.function.Supplier<NetworkEvent.Context>,NetworkEvent> eventSupplier
private final LogicalSide logicalSide
private final java.lang.Class<? extends IPacket> packetClass
private final int otherWay
private static final it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<java.lang.Class<? extends IPacket>,NetworkDirection> packetLookup
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 nullprivate java.lang.Class<? extends IPacket> getPacketClass()
public 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)