Enum Class NetworkDirection
- 所有已实现的接口:
Serializable
,Comparable<NetworkDirection>
,Constable
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
枚举常量概要
枚举常量 -
字段概要
字段修饰符和类型字段说明private final BiFunction<ICustomPacket<?>,
Supplier<NetworkEvent.Context>, NetworkEvent> private final NetworkDirection.Factory
private final net.minecraftforge.fml.LogicalSide
private final int
private static final it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<Class<? extends Packet>,
NetworkDirection> -
构造器概要
构造器限定符构造器说明private
NetworkDirection
(BiFunction<ICustomPacket<?>, Supplier<NetworkEvent.Context>, NetworkEvent> eventSupplier, net.minecraftforge.fml.LogicalSide logicalSide, Class<? extends Packet> clazz, int i, NetworkDirection.Factory factory) -
方法概要
修饰符和类型方法说明<T extends Packet<?>>
ICustomPacket<T>buildPacket
(org.apache.commons.lang3.tuple.Pair<FriendlyByteBuf, Integer> packetData, ResourceLocation channelName) static <T extends ICustomPacket<?>>
NetworkDirectiondirectionFor
(Class<T> customPacket) getEvent
(ICustomPacket<?> buffer, Supplier<NetworkEvent.Context> manager) net.minecraftforge.fml.LogicalSide
net.minecraftforge.fml.LogicalSide
reply()
static NetworkDirection
Returns the enum constant of this class with the specified name.static NetworkDirection[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
PLAY_TO_SERVER
-
PLAY_TO_CLIENT
-
LOGIN_TO_SERVER
-
LOGIN_TO_CLIENT
-
-
字段详细资料
-
eventSupplier
private final BiFunction<ICustomPacket<?>,Supplier<NetworkEvent.Context>, eventSupplierNetworkEvent> -
logicalSide
private final net.minecraftforge.fml.LogicalSide logicalSide -
packetClass
-
otherWay
private final int otherWay -
factory
-
packetLookup
private static final it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<Class<? extends Packet>,NetworkDirection> packetLookup
-
-
构造器详细资料
-
NetworkDirection
private NetworkDirection(BiFunction<ICustomPacket<?>, Supplier<NetworkEvent.Context>, NetworkEvent> eventSupplier, net.minecraftforge.fml.LogicalSide logicalSide, Class<? extends Packet> clazz, int i, NetworkDirection.Factory factory)
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- 如果参数为空值
-
getPacketClass
-
directionFor
-
reply
-
getEvent
-
getOriginationSide
public net.minecraftforge.fml.LogicalSide getOriginationSide() -
getReceptionSide
public net.minecraftforge.fml.LogicalSide getReceptionSide() -
buildPacket
public <T extends Packet<?>> ICustomPacket<T> buildPacket(org.apache.commons.lang3.tuple.Pair<FriendlyByteBuf, Integer> packetData, ResourceLocation channelName)
-