Interface CCFriendlyByteBufExtension

All Known Subinterfaces:
CCRegistryFriendlyByteBufExtension
All Known Implementing Classes:
ConfigurationStreamPacket, net.minecraft.network.FriendlyByteBuf, FriendlyByteBufMixin, net.minecraft.network.RegistryFriendlyByteBuf, RegistryFriendlyByteBufMixin, StreamPacket, StreamPacket.ToClient, StreamPacket.ToServer

public interface CCFriendlyByteBufExtension
An extension interface containing various helpers for reading and writing to FriendlyByteBuf.

Created by covers1624 on 10/31/25.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Reads a Variable length signed int.
    default long
    Reads a Variable length signed long.
    default <T> T
    cc$readWithCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.FriendlyByteBuf,? extends T> codec)
    Read from the stream with a StreamDecoder / StreamCodec.
    default net.minecraft.network.FriendlyByteBuf
    Writes a Signed Variable length int.
    default net.minecraft.network.FriendlyByteBuf
    Writes a Signed Variable length long.
    default <T> net.minecraft.network.FriendlyByteBuf
    cc$writeWithCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.FriendlyByteBuf,? super T> codec, T thing)
    Write to the stream with a StreamEncoder / StreamCodec.
    default Cuboid6
    Read a Cuboid6 from the stream.
    default Vector3
    Read a Vector3 from the stream.
    default net.minecraft.network.FriendlyByteBuf
    Write a Cuboid6 to the stream.
    default net.minecraft.network.FriendlyByteBuf
    Write a Vector3 to the stream.
  • Method Details

    • cc$writeSignedVarInt

      default net.minecraft.network.FriendlyByteBuf cc$writeSignedVarInt(int i)
      Writes a Signed Variable length int. Favourable for numbers <= -1
      Parameters:
      i - The int.
      Returns:
      The same stream.
    • cc$readSignedVarInt

      default int cc$readSignedVarInt()
      Reads a Variable length signed int.
      Returns:
      The int.
      See Also:
    • cc$writeSignedVarLong

      default net.minecraft.network.FriendlyByteBuf cc$writeSignedVarLong(long i)
      Writes a Signed Variable length long. Favourable for numbers <= -1
      Parameters:
      i - The long.
      Returns:
      The same stream.
    • cc$readSignedVarLong

      default long cc$readSignedVarLong()
      Reads a Variable length signed long.
      Returns:
      The long.
      See Also:
    • cc$writeWithCodec

      default <T> net.minecraft.network.FriendlyByteBuf cc$writeWithCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.FriendlyByteBuf,? super T> codec, T thing)
      Write to the stream with a StreamEncoder / StreamCodec.
      Parameters:
      codec - The codec.
      thing - The thing to write.
      Returns:
      The same stream.
    • cc$readWithCodec

      default <T> T cc$readWithCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.FriendlyByteBuf,? extends T> codec)
      Read from the stream with a StreamDecoder / StreamCodec.
      Parameters:
      codec - The codec.
      Returns:
      The thing that was read.
    • writeVector3

      default net.minecraft.network.FriendlyByteBuf writeVector3(Vector3 vec)
      Write a Vector3 to the stream.
      Parameters:
      vec - The vector.
      Returns:
      The same stream.
    • readVector3

      default Vector3 readVector3()
      Read a Vector3 from the stream.
      Returns:
      The vector.
    • writeCuboid6

      default net.minecraft.network.FriendlyByteBuf writeCuboid6(Cuboid6 cuboid)
      Write a Cuboid6 to the stream.
      Parameters:
      cuboid - The cuboid.
      Returns:
      The same stream.
    • readCuboid6

      default Cuboid6 readCuboid6()
      Read a Cuboid6 from the stream.
      Returns:
      The cuboid.