public static class SimpleChannel.MessageBuilder<MSG>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SimpleChannel.MessageBuilder.ToBooleanBiFunction<T,U> |
Constructor and Description |
---|
MessageBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
add() |
SimpleChannel.MessageBuilder<MSG> |
buildLoginPacketList(java.util.function.Function<java.lang.Boolean,java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,MSG>>> loginPacketGenerators) |
SimpleChannel.MessageBuilder<MSG> |
consumer(java.util.function.BiConsumer<MSG,java.util.function.Supplier<net.minecraftforge.fml.network.NetworkEvent.Context>> consumer) |
SimpleChannel.MessageBuilder<MSG> |
consumer(SimpleChannel.MessageBuilder.ToBooleanBiFunction<MSG,java.util.function.Supplier<net.minecraftforge.fml.network.NetworkEvent.Context>> handler)
Function returning a boolean "packet handled" indication, for simpler channel building.
|
SimpleChannel.MessageBuilder<MSG> |
decoder(java.util.function.Function<net.minecraft.network.PacketBuffer,MSG> decoder) |
SimpleChannel.MessageBuilder<MSG> |
encoder(java.util.function.BiConsumer<MSG,net.minecraft.network.PacketBuffer> encoder) |
SimpleChannel.MessageBuilder<MSG> |
loginIndex(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter,
java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter) |
SimpleChannel.MessageBuilder<MSG> |
markAsLoginPacket() |
public SimpleChannel.MessageBuilder<MSG> encoder(java.util.function.BiConsumer<MSG,net.minecraft.network.PacketBuffer> encoder)
public SimpleChannel.MessageBuilder<MSG> decoder(java.util.function.Function<net.minecraft.network.PacketBuffer,MSG> decoder)
public SimpleChannel.MessageBuilder<MSG> loginIndex(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter, java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter)
public SimpleChannel.MessageBuilder<MSG> buildLoginPacketList(java.util.function.Function<java.lang.Boolean,java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,MSG>>> loginPacketGenerators)
public SimpleChannel.MessageBuilder<MSG> markAsLoginPacket()
public SimpleChannel.MessageBuilder<MSG> consumer(java.util.function.BiConsumer<MSG,java.util.function.Supplier<net.minecraftforge.fml.network.NetworkEvent.Context>> consumer)
public SimpleChannel.MessageBuilder<MSG> consumer(SimpleChannel.MessageBuilder.ToBooleanBiFunction<MSG,java.util.function.Supplier<net.minecraftforge.fml.network.NetworkEvent.Context>> handler)
handler
- a handlerpublic void add()