Class DinnerboneProtocolUtils
java.lang.Object
net.neoforged.neoforge.network.payload.DinnerboneProtocolUtils
Protocol utilities for communicating over Dinnerbone's protocol.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final StreamCodec
<FriendlyByteBuf, Set<ResourceLocation>> static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
parseAndAddChannel
(StringBuilder builder, Set<ResourceLocation> channels) private static Set
<ResourceLocation> Reads a set of channels from the buffer.private static void
writeChannels
(FriendlyByteBuf buf, Set<ResourceLocation> channels) Writes a set of channels to the buffer.
-
Field Details
-
LOGGER
public static final org.slf4j.Logger LOGGER -
CHANNELS_CODEC
-
-
Constructor Details
-
DinnerboneProtocolUtils
private DinnerboneProtocolUtils()
-
-
Method Details
-
readChannels
Reads a set of channels from the buffer. Each channel is a null-terminated string. If a string is not a valid channel, it is ignored.- Parameters:
buf
- the buffer- Returns:
- the channels
-
parseAndAddChannel
-
writeChannels
Writes a set of channels to the buffer. Each channel is a null-terminated string.- Parameters:
buf
- the bufferchannels
- the channels
-