Class IndexedMessageCodec.MessageHandler<MSG>
java.lang.Object
net.minecraftforge.network.simple.IndexedMessageCodec.MessageHandler<MSG>
- Enclosing class:
 - IndexedMessageCodec
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<Function<FriendlyByteBuf,MSG>> private final Optional<BiConsumer<MSG,FriendlyByteBuf>> private final intprivate Optional<BiConsumer<MSG,Integer>> private final BiConsumer<MSG,Supplier<NetworkEvent.Context>> private final Optional<NetworkDirection> - 
Constructor Summary
ConstructorsConstructorDescriptionMessageHandler(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) voidsetLoginIndexGetter(Function<MSG, Integer> loginIndexGetter) (package private) voidsetLoginIndexSetter(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() 
 -