Class DinnerboneProtocolUtils

java.lang.Object
net.neoforged.neoforge.network.payload.DinnerboneProtocolUtils

@Internal public final class DinnerboneProtocolUtils extends Object
Protocol utilities for communicating over Dinnerbone's protocol.
  • Field Details

  • Constructor Details

    • DinnerboneProtocolUtils

      private DinnerboneProtocolUtils()
  • Method Details

    • readChannels

      private static Set<ResourceLocation> readChannels(FriendlyByteBuf buf)
      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

      private static void parseAndAddChannel(StringBuilder builder, Set<ResourceLocation> channels)
    • writeChannels

      private static void writeChannels(FriendlyByteBuf buf, Set<ResourceLocation> channels)
      Writes a set of channels to the buffer. Each channel is a null-terminated string.
      Parameters:
      buf - the buffer
      channels - the channels