Class IndexedMessageCodec.MessageHandler<MSG>
java.lang.Object
net.minecraftforge.fmllegacy.network.simple.IndexedMessageCodec.MessageHandler<MSG>
- Enclosing class:
- IndexedMessageCodec
-
Field Summary
Modifier and TypeFieldDescriptionprivate Optional<Function<FriendlyByteBuf,MSG>>
private Optional<BiConsumer<MSG,FriendlyByteBuf>>
private int
private Optional<BiConsumer<MSG,Integer>>
private BiConsumer<MSG,Supplier<NetworkEvent.Context>>
private Optional<NetworkDirection>
-
Constructor Summary
ConstructorDescriptionMessageHandler(int index, Class<MSG> messageType, BiConsumer<MSG,FriendlyByteBuf> encoder, Function<FriendlyByteBuf,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,FriendlyByteBuf> encoder, Function<FriendlyByteBuf,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()
-