Class IndexedMessageCodec.MessageHandler<MSG>
java.lang.Object
net.minecraftforge.fml.network.simple.IndexedMessageCodec.MessageHandler<MSG>
- Enclosing class:
- IndexedMessageCodec
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<Function<PacketBuffer,
MSG>> private final Optional<BiConsumer<MSG,
PacketBuffer>> private final int
private Optional<BiConsumer<MSG,
Integer>> private final BiConsumer<MSG,
Supplier<NetworkEvent.Context>> private final Optional<NetworkDirection>
-
Constructor Summary
ConstructorDescriptionMessageHandler
(int index, Class<MSG> messageType, BiConsumer<MSG, PacketBuffer> encoder, Function<PacketBuffer, MSG> decoder, BiConsumer<MSG, Supplier<NetworkEvent.Context>> messageConsumer, Optional<NetworkDirection> networkDirection) -
Method Summary
Modifier and TypeMethodDescription(package private) Optional<BiConsumer<MSG,
Integer>> (package private) MSG
(package private) void
setLoginIndexGetter
(Function<MSG, Integer> loginIndexGetter) (package private) void
setLoginIndexSetter
(BiConsumer<MSG, Integer> loginIndexSetter)
-
Field Details
-
encoder
-
decoder
-
index
private final int index -
messageConsumer
-
messageType
-
networkDirection
-
loginIndexSetter
-
loginIndexGetter
-
-
Constructor Details
-
MessageHandler
public MessageHandler(int index, Class<MSG> messageType, BiConsumer<MSG, PacketBuffer> encoder, Function<PacketBuffer, MSG> decoder, BiConsumer<MSG, Supplier<NetworkEvent.Context>> messageConsumer, Optional<NetworkDirection> networkDirection)
-
-
Method Details
-
setLoginIndexSetter
-
getLoginIndexSetter
Optional<BiConsumer<MSG,Integer>> getLoginIndexSetter() -
setLoginIndexGetter
-
getLoginIndexGetter
-
newInstance
MSG newInstance()
-