Package | Description |
---|---|
net.minecraftforge.fml.network | |
net.minecraftforge.fml.network.simple |
Modifier and Type | Field and Description |
---|---|
private NetworkDirection |
FMLHandshakeHandler.direction |
private NetworkDirection |
PacketDistributor.direction |
private NetworkDirection |
NetworkEvent.Context.networkDirection
The
NetworkDirection this message has been received on. |
Modifier and Type | Field and Description |
---|---|
private static it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<java.lang.Class<? extends IPacket>,NetworkDirection> |
NetworkDirection.packetLookup |
Modifier and Type | Method and Description |
---|---|
static <T extends ICustomPacket<?>> |
NetworkDirection.directionFor(java.lang.Class<T> customPacket) |
default NetworkDirection |
ICustomPacket.getDirection() |
NetworkDirection |
NetworkEvent.Context.getDirection() |
NetworkDirection |
PacketDistributor.PacketTarget.getDirection() |
NetworkDirection |
NetworkDirection.reply() |
static NetworkDirection |
NetworkDirection.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NetworkDirection[] |
NetworkDirection.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
NetworkInstance.dispatch(NetworkDirection side,
ICustomPacket<?> packet,
NetworkManager manager) |
(package private) static java.util.List<NetworkRegistry.LoginPayload> |
NetworkRegistry.gatherLoginPayloads(NetworkDirection direction,
boolean isLocal)
Retrieve the
NetworkRegistry.LoginPayload list for dispatch during FMLHandshakeHandler.tickLogin(NetworkManager) handling. |
(package private) static void |
FMLHandshakeHandler.registerHandshake(NetworkManager manager,
NetworkDirection direction)
Create a new handshake instance.
|
void |
FMLMCRegisterPacketHandler.sendRegistry(NetworkManager manager,
NetworkDirection dir) |
static void |
NetworkHooks.validatePacketDirection(NetworkDirection packetDirection,
java.util.Optional<NetworkDirection> expectedDirection,
NetworkManager connection) |
Modifier and Type | Method and Description |
---|---|
static void |
NetworkHooks.validatePacketDirection(NetworkDirection packetDirection,
java.util.Optional<NetworkDirection> expectedDirection,
NetworkManager connection) |
Constructor and Description |
---|
Context(NetworkManager netHandler,
NetworkDirection networkDirection,
int index) |
Context(NetworkManager networkManager,
NetworkDirection networkDirection,
PacketDispatcher dispatcher) |
FMLHandshakeHandler(NetworkManager networkManager,
NetworkDirection side) |
PacketDistributor(java.util.function.BiFunction<PacketDistributor<T>,java.util.function.Supplier<T>,java.util.function.Consumer<IPacket<?>>> functor,
NetworkDirection direction) |
Modifier and Type | Field and Description |
---|---|
private java.util.Optional<NetworkDirection> |
SimpleChannel.MessageBuilder.networkDirection |
private java.util.Optional<NetworkDirection> |
IndexedMessageCodec.MessageHandler.networkDirection |
Modifier and Type | Method and Description |
---|---|
private static <MSG> SimpleChannel.MessageBuilder<MSG> |
SimpleChannel.MessageBuilder.forType(SimpleChannel channel,
java.lang.Class<MSG> type,
int id,
NetworkDirection networkDirection) |
<M> SimpleChannel.MessageBuilder<M> |
SimpleChannel.messageBuilder(java.lang.Class<M> type,
int id,
NetworkDirection direction)
Build a new MessageBuilder.
|
<MSG> void |
SimpleChannel.sendTo(MSG message,
NetworkManager manager,
NetworkDirection direction) |
<MSG> IPacket<?> |
SimpleChannel.toVanillaPacket(MSG message,
NetworkDirection direction) |
Modifier and Type | Method and Description |
---|---|
(package private) <MSG> IndexedMessageCodec.MessageHandler<MSG> |
IndexedMessageCodec.addCodecIndex(int index,
java.lang.Class<MSG> messageType,
java.util.function.BiConsumer<MSG,PacketBuffer> encoder,
java.util.function.Function<PacketBuffer,MSG> decoder,
java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer,
java.util.Optional<NetworkDirection> networkDirection) |
<MSG> IndexedMessageCodec.MessageHandler<MSG> |
SimpleChannel.registerMessage(int index,
java.lang.Class<MSG> messageType,
java.util.function.BiConsumer<MSG,PacketBuffer> encoder,
java.util.function.Function<PacketBuffer,MSG> decoder,
java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer,
java.util.Optional<NetworkDirection> networkDirection) |
Constructor and Description |
---|
MessageHandler(int index,
java.lang.Class<MSG> messageType,
java.util.function.BiConsumer<MSG,PacketBuffer> encoder,
java.util.function.Function<PacketBuffer,MSG> decoder,
java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer,
java.util.Optional<NetworkDirection> networkDirection) |