Uses of Class
net.minecraftforge.network.simple.SimpleChannel.MessageBuilder
-
Uses of SimpleChannel.MessageBuilder in net.minecraftforge.network.simple
Modifier and TypeMethodDescriptionSimpleChannel.MessageBuilder.buildLoginPacketList
(Function<Boolean, List<org.apache.commons.lang3.tuple.Pair<String, MSG>>> loginPacketGenerators) SimpleChannel.MessageBuilder.consumerMainThread
(BiConsumer<MSG, Supplier<NetworkEvent.Context>> consumer) Set the message consumer, which is called once a message has been decoded.SimpleChannel.MessageBuilder.consumerNetworkThread
(BiConsumer<MSG, Supplier<NetworkEvent.Context>> consumer) Set the message consumer, which is called once a message has been decoded.SimpleChannel.MessageBuilder.consumerNetworkThread
(SimpleChannel.MessageBuilder.ToBooleanBiFunction<MSG, Supplier<NetworkEvent.Context>> handler) Function returning a boolean "packet handled" indication, for simpler channel building.SimpleChannel.MessageBuilder.decoder
(Function<FriendlyByteBuf, MSG> decoder) Set the message decoder, which reads the message from aFriendlyByteBuf
.SimpleChannel.MessageBuilder.encoder
(BiConsumer<MSG, FriendlyByteBuf> encoder) Set the message encoder, which writes this message to aFriendlyByteBuf
.private static <MSG> SimpleChannel.MessageBuilder<MSG>
SimpleChannel.MessageBuilder.forType
(SimpleChannel channel, Class<MSG> type, int id, NetworkDirection networkDirection) SimpleChannel.MessageBuilder.loginIndex
(Function<MSG, Integer> loginIndexGetter, BiConsumer<MSG, Integer> loginIndexSetter) SimpleChannel.MessageBuilder.markAsLoginPacket()
<M> SimpleChannel.MessageBuilder<M>
SimpleChannel.messageBuilder
(Class<M> type, int id) Build a new MessageBuilder.<M> SimpleChannel.MessageBuilder<M>
SimpleChannel.messageBuilder
(Class<M> type, int id, NetworkDirection direction) Build a new MessageBuilder.SimpleChannel.MessageBuilder.noResponse()
Marks this packet as not needing a response when sent to the client