Class IndexedMessageCodec.MessageHandler<MSG>
- java.lang.Object
-
- net.minecraftforge.fml.network.simple.IndexedMessageCodec.MessageHandler<MSG>
-
- Enclosing class:
- IndexedMessageCodec
class IndexedMessageCodec.MessageHandler<MSG> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Optional<java.util.function.Function<PacketBuffer,MSG>>
decoder
private java.util.Optional<java.util.function.BiConsumer<MSG,PacketBuffer>>
encoder
private int
index
private java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>>
loginIndexGetter
private java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>>
loginIndexSetter
private java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>>
messageConsumer
private java.lang.Class<MSG>
messageType
private java.util.Optional<NetworkDirection>
networkDirection
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>>
getLoginIndexGetter()
(package private) java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>>
getLoginIndexSetter()
(package private) MSG
newInstance()
(package private) void
setLoginIndexGetter(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter)
(package private) void
setLoginIndexSetter(java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter)
-
-
-
Field Detail
-
encoder
private final java.util.Optional<java.util.function.BiConsumer<MSG,PacketBuffer>> encoder
-
decoder
private final java.util.Optional<java.util.function.Function<PacketBuffer,MSG>> decoder
-
index
private final int index
-
messageConsumer
private final java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer
-
messageType
private final java.lang.Class<MSG> messageType
-
networkDirection
private final java.util.Optional<NetworkDirection> networkDirection
-
loginIndexSetter
private java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> loginIndexSetter
-
loginIndexGetter
private java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> loginIndexGetter
-
-
Constructor Detail
-
MessageHandler
public 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)
-
-
Method Detail
-
setLoginIndexSetter
void setLoginIndexSetter(java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter)
-
getLoginIndexSetter
java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> getLoginIndexSetter()
-
setLoginIndexGetter
void setLoginIndexGetter(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter)
-
getLoginIndexGetter
public java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> getLoginIndexGetter()
-
newInstance
MSG newInstance()
-
-