Package codechicken.lib.packet
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 TypeMethodDescriptiondefault intReads a Variable length signed int.default longReads a Variable length signed long.default <T> Tcc$readWithCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.FriendlyByteBuf, ? extends T> codec) Read from the stream with aStreamDecoder/StreamCodec.default net.minecraft.network.FriendlyByteBufcc$writeSignedVarInt(int i) Writes a Signed Variable length int.default net.minecraft.network.FriendlyByteBufcc$writeSignedVarLong(long i) Writes a Signed Variable length long.default <T> net.minecraft.network.FriendlyByteBufcc$writeWithCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.FriendlyByteBuf, ? super T> codec, T thing) Write to the stream with aStreamEncoder/StreamCodec.default Cuboid6Read aCuboid6from the stream.default Vector3Read aVector3from the stream.default net.minecraft.network.FriendlyByteBufwriteCuboid6(Cuboid6 cuboid) Write aCuboid6to the stream.default net.minecraft.network.FriendlyByteBufwriteVector3(Vector3 vec) Write aVector3to 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 aStreamEncoder/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 aStreamDecoder/StreamCodec.- Parameters:
codec- The codec.- Returns:
- The thing that was read.
-
writeVector3
Write aVector3to the stream.- Parameters:
vec- The vector.- Returns:
- The same stream.
-
readVector3
Read aVector3from the stream.- Returns:
- The vector.
-
writeCuboid6
Write aCuboid6to the stream.- Parameters:
cuboid- The cuboid.- Returns:
- The same stream.
-
readCuboid6
Read aCuboid6from the stream.- Returns:
- The cuboid.
-