Class IndexedMessageCodec.MessageHandler<MSG>
java.lang.Object
net.neoforged.neoforge.network.simple.IndexedMessageCodec.MessageHandler<MSG>
- Enclosing class:
- IndexedMessageCodec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<MessageFunctions.MessageDecoder<MSG>>
private final Optional<MessageFunctions.MessageEncoder<MSG>>
private final int
private Optional<MessageFunctions.LoginIndexGetter<MSG>>
private Optional<MessageFunctions.LoginIndexSetter<MSG>>
private final MessageFunctions.MessageConsumer<MSG>
private final Optional<INetworkDirection<?>>
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHandler
(int index, Class<MSG> messageType, MessageFunctions.MessageEncoder<MSG> encoder, MessageFunctions.MessageDecoder<MSG> decoder, MessageFunctions.MessageConsumer<MSG> messageConsumer, Optional<INetworkDirection<?>> networkDirection) -
Method Summary
Modifier and TypeMethodDescription(package private) Optional<MessageFunctions.LoginIndexSetter<MSG>>
(package private) MSG
(package private) void
setLoginIndexGetter
(MessageFunctions.LoginIndexGetter<MSG> loginIndexGetter) (package private) void
setLoginIndexSetter
(MessageFunctions.LoginIndexSetter<MSG> 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, MessageFunctions.MessageEncoder<MSG> encoder, MessageFunctions.MessageDecoder<MSG> decoder, MessageFunctions.MessageConsumer<MSG> messageConsumer, Optional<INetworkDirection<?>> networkDirection)
-
-
Method Details
-
setLoginIndexSetter
-
getLoginIndexSetter
Optional<MessageFunctions.LoginIndexSetter<MSG>> getLoginIndexSetter() -
setLoginIndexGetter
-
getLoginIndexGetter
-
newInstance
MSG newInstance()
-