Class PacketByteBuf

java.lang.Object
io.netty.buffer.ByteBuf
net.minecraft.network.PacketByteBuf
All Implemented Interfaces:
ReferenceCounted, Comparable<ByteBuf>

public class PacketByteBuf extends ByteBuf
Mappings:
Namespace Name
official og
intermediary net/minecraft/class_2540
named net/minecraft/network/PacketByteBuf
  • Field Details

    • MAX_VAR_INT_LENGTH

      private static final int MAX_VAR_INT_LENGTH
      The max number of bytes an encoded var int value may use.

      Its value is 5. A regular int value always use 4 bytes in contrast.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Log;c:I
      intermediary field_33285 Lnet/minecraft/class_2540;field_33285:I
      named MAX_VAR_INT_LENGTH Lnet/minecraft/network/PacketByteBuf;MAX_VAR_INT_LENGTH:I
    • MAX_VAR_LONG_LENGTH

      private static final int MAX_VAR_LONG_LENGTH
      The max number of bytes an encoded var long value may use.

      Its value is 10. A regular long value always use 8 bytes in contrast.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Log;d:I
      intermediary field_33286 Lnet/minecraft/class_2540;field_33286:I
      named MAX_VAR_LONG_LENGTH Lnet/minecraft/network/PacketByteBuf;MAX_VAR_LONG_LENGTH:I
    • MAX_READ_NBT_SIZE

      private static final int MAX_READ_NBT_SIZE
      The maximum size, in number of bytes, allowed of the NBT compound read by readNbt().
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Log;e:I
      intermediary field_33287 Lnet/minecraft/class_2540;field_33287:I
      named MAX_READ_NBT_SIZE Lnet/minecraft/network/PacketByteBuf;MAX_READ_NBT_SIZE:I
    • DEFAULT_MAX_STRING_LENGTH

      public static final short DEFAULT_MAX_STRING_LENGTH
      The default max length of strings read or written. This is also the max length of identifiers read or written in their string form.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a:S
      intermediary field_33283 Lnet/minecraft/class_2540;field_33283:S
      named DEFAULT_MAX_STRING_LENGTH Lnet/minecraft/network/PacketByteBuf;DEFAULT_MAX_STRING_LENGTH:S
    • MAX_TEXT_LENGTH

      public static final int MAX_TEXT_LENGTH
      The maximum size, in terms of JSON string length, allowed of the text read by readText() or written by writeText(Text).
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Log;b:I
      intermediary field_33284 Lnet/minecraft/class_2540;field_33284:I
      named MAX_TEXT_LENGTH Lnet/minecraft/network/PacketByteBuf;MAX_TEXT_LENGTH:I
    • parent

      private final ByteBuf parent
      Mappings:
      Namespace Name Mixin selector
      official f Log;f:Lio/netty/buffer/ByteBuf;
      intermediary field_11695 Lnet/minecraft/class_2540;field_11695:Lio/netty/buffer/ByteBuf;
      named parent Lnet/minecraft/network/PacketByteBuf;parent:Lio/netty/buffer/ByteBuf;
  • Constructor Details

    • PacketByteBuf

      public PacketByteBuf(ByteBuf parent)
      Creates a packet byte buf that delegates its operations to the parent buf.
      Parameters:
      parent - the parent, or delegate, buf
      Mappings:
      Namespace Name Mixin selector
      official <init> Log;<init>(Lio/netty/buffer/ByteBuf;)V
      intermediary <init> Lnet/minecraft/class_2540;<init>(Lio/netty/buffer/ByteBuf;)V
      named <init> Lnet/minecraft/network/PacketByteBuf;<init>(Lio/netty/buffer/ByteBuf;)V
  • Method Details

    • getVarIntLength

      public static int getVarIntLength(int value)
      Returns the number of bytes needed to encode value as a var int. Guaranteed to be between 1 and 5.
      Parameters:
      value - the value to encode
      Returns:
      the number of bytes a var int value uses
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(I)I
      intermediary method_10815 Lnet/minecraft/class_2540;method_10815(I)I
      named getVarIntLength Lnet/minecraft/network/PacketByteBuf;getVarIntLength(I)I
    • getVarLongLength

      public static int getVarLongLength(long value)
      Returns the number of bytes needed to encode value as a var long. Guaranteed to be between 1 and 10.
      Parameters:
      value - the value to encode
      Returns:
      the number of bytes a var long value uses
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(J)I
      intermediary method_36129 Lnet/minecraft/class_2540;method_36129(J)I
      named getVarLongLength Lnet/minecraft/network/PacketByteBuf;getVarLongLength(J)I
    • decode

      public <T> T decode(com.mojang.serialization.Codec<T> codec)
      Reads an object from this buf as a compound NBT with the given codec.
      Type Parameters:
      T - the decoded object's type
      Parameters:
      codec - the codec to decode the object
      Returns:
      the read object
      Throws:
      EncoderException - if the codec fails to decode the compound NBT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;
      intermediary method_29171 Lnet/minecraft/class_2540;method_29171(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;
      named decode Lnet/minecraft/network/PacketByteBuf;decode(Lcom/mojang/serialization/Codec;)Ljava/lang/Object;
    • encode

      public <T> void encode(com.mojang.serialization.Codec<T> codec, T object)
      Writes an object to this buf as a compound NBT with the given codec.
      Type Parameters:
      T - the encoded object's type
      Parameters:
      codec - the codec to encode the object
      object - the object to write to this buf
      Throws:
      EncoderException - if the codec fails to encode the compound NBT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)V
      intermediary method_29172 Lnet/minecraft/class_2540;method_29172(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)V
      named encode Lnet/minecraft/network/PacketByteBuf;encode(Lcom/mojang/serialization/Codec;Ljava/lang/Object;)V
    • readCollection

      public <T, C extends Collection<T>> C readCollection(IntFunction<C> collectionFactory, Function<PacketByteBuf,T> entryParser)
      Reads a collection from this buf. The collection is stored as a leading var int size followed by the entries sequentially.
      Type Parameters:
      T - the collection's entry type
      C - the collection's type
      Parameters:
      collectionFactory - a factory that creates a collection with a given size
      entryParser - a parser that parses each entry for the collection given this buf
      Returns:
      the read collection
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/function/IntFunction;Ljava/util/function/Function;)Ljava/util/Collection;
      intermediary method_34068 Lnet/minecraft/class_2540;method_34068(Ljava/util/function/IntFunction;Ljava/util/function/Function;)Ljava/util/Collection;
      named readCollection Lnet/minecraft/network/PacketByteBuf;readCollection(Ljava/util/function/IntFunction;Ljava/util/function/Function;)Ljava/util/Collection;
    • writeCollection

      public <T> void writeCollection(Collection<T> collection, BiConsumer<PacketByteBuf,T> entrySerializer)
      Writes a collection to this buf. The collection is stored as a leading var int size followed by the entries sequentially.
      Type Parameters:
      T - the list's entry type
      Parameters:
      collection - the collection to write
      entrySerializer - a serializer that writes each entry to this buf
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/Collection;Ljava/util/function/BiConsumer;)V
      intermediary method_34062 Lnet/minecraft/class_2540;method_34062(Ljava/util/Collection;Ljava/util/function/BiConsumer;)V
      named writeCollection Lnet/minecraft/network/PacketByteBuf;writeCollection(Ljava/util/Collection;Ljava/util/function/BiConsumer;)V
    • readList

      public <T> List<T> readList(Function<PacketByteBuf,T> entryParser)
      Reads a collection from this buf as an array list.
      Type Parameters:
      T - the list's entry type
      Parameters:
      entryParser - a parser that parses each entry for the collection given this buf
      Returns:
      the read list
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/function/Function;)Ljava/util/List;
      intermediary method_34066 Lnet/minecraft/class_2540;method_34066(Ljava/util/function/Function;)Ljava/util/List;
      named readList Lnet/minecraft/network/PacketByteBuf;readList(Ljava/util/function/Function;)Ljava/util/List;
    • readIntList

      public IntList readIntList()
      Reads a list of primitive ints from this buf. The ints are stored as var ints, with an extra var int in the beginning indicating the size.
      Returns:
      the read list
      See Also:
      API Note:
      To limit the length of the list or array read, use readIntArray(int).
      Implementation Note:
      A list of ints has the same format as an int array.
      Mappings:
      Namespace Name Mixin selector
      official a Log;a()Lit/unimi/dsi/fastutil/ints/IntList;
      intermediary method_34059 Lnet/minecraft/class_2540;method_34059()Lit/unimi/dsi/fastutil/ints/IntList;
      named readIntList Lnet/minecraft/network/PacketByteBuf;readIntList()Lit/unimi/dsi/fastutil/ints/IntList;
    • writeIntList

      public void writeIntList(IntList list)
      Writes a list of primitive ints from this buf. The ints are stored as var ints, with an extra var int in the beginning indicating the size.
      Parameters:
      list - the list to write
      See Also:
      Implementation Note:
      A list of ints has the same format as an int array.
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lit/unimi/dsi/fastutil/ints/IntList;)V
      intermediary method_34060 Lnet/minecraft/class_2540;method_34060(Lit/unimi/dsi/fastutil/ints/IntList;)V
      named writeIntList Lnet/minecraft/network/PacketByteBuf;writeIntList(Lit/unimi/dsi/fastutil/ints/IntList;)V
    • readMap

      public <K, V, M extends Map<K, V>> M readMap(IntFunction<M> mapFactory, Function<PacketByteBuf,K> keyParser, Function<PacketByteBuf,V> valueParser)
      Reads a map from this buf. The map is stored as a leading var int size followed by each key and value pair.
      Type Parameters:
      K - the key type
      V - the value type
      M - the map type
      Parameters:
      mapFactory - a factory that creates a map with a given size
      keyParser - a parser that parses each key for the map given this buf
      valueParser - a parser that parses each value for the map given this buf
      Returns:
      the read map
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/function/IntFunction;Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
      intermediary method_34069 Lnet/minecraft/class_2540;method_34069(Ljava/util/function/IntFunction;Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
      named readMap Lnet/minecraft/network/PacketByteBuf;readMap(Ljava/util/function/IntFunction;Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
    • readMap

      public <K, V> Map<K,V> readMap(Function<PacketByteBuf,K> keyParser, Function<PacketByteBuf,V> valueParser)
      Reads a map from this buf as a hash map.
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      keyParser - a parser that parses each key for the map given this buf
      valueParser - a parser that parses each value for the map given this buf
      Returns:
      the read map
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
      intermediary method_34067 Lnet/minecraft/class_2540;method_34067(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
      named readMap Lnet/minecraft/network/PacketByteBuf;readMap(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/Map;
    • writeMap

      public <K, V> void writeMap(Map<K,V> map, BiConsumer<PacketByteBuf,K> keySerializer, BiConsumer<PacketByteBuf,V> valueSerializer)
      Writes a map to this buf. The map is stored as a leading var int size followed by each key and value pair.
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      map - the map to write
      keySerializer - a serializer that writes each key in the map to this buf
      valueSerializer - a serializer that writes each value in the map to this buf
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/Map;Ljava/util/function/BiConsumer;Ljava/util/function/BiConsumer;)V
      intermediary method_34063 Lnet/minecraft/class_2540;method_34063(Ljava/util/Map;Ljava/util/function/BiConsumer;Ljava/util/function/BiConsumer;)V
      named writeMap Lnet/minecraft/network/PacketByteBuf;writeMap(Ljava/util/Map;Ljava/util/function/BiConsumer;Ljava/util/function/BiConsumer;)V
    • forEachInCollection

      public void forEachInCollection(Consumer<PacketByteBuf> consumer)
      Iterates a collection from this buf. The collection is stored as a leading var int size followed by the entries sequentially. The consumer will be called size times.
      Parameters:
      consumer - the consumer to read entries
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/function/Consumer;)V
      intermediary method_34065 Lnet/minecraft/class_2540;method_34065(Ljava/util/function/Consumer;)V
      named forEachInCollection Lnet/minecraft/network/PacketByteBuf;forEachInCollection(Ljava/util/function/Consumer;)V
    • readByteArray

      public byte[] readByteArray()
      Reads an array of primitive bytes from this buf. The array first has a var int indicating its length, followed by the actual bytes. The array does not have a length limit.
      Returns:
      the read byte array
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Log;b()[B
      intermediary method_10795 Lnet/minecraft/class_2540;method_10795()[B
      named readByteArray Lnet/minecraft/network/PacketByteBuf;readByteArray()[B
    • writeByteArray

      public PacketByteBuf writeByteArray(byte[] array)
      Writes an array of primitive bytes to this buf. The array first has a var int indicating its length, followed by the actual bytes.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a([B)Log;
      intermediary method_10813 Lnet/minecraft/class_2540;method_10813([B)Lnet/minecraft/class_2540;
      named writeByteArray Lnet/minecraft/network/PacketByteBuf;writeByteArray([B)Lnet/minecraft/network/PacketByteBuf;
    • readByteArray

      public byte[] readByteArray(int maxSize)
      Reads an array of primitive bytes from this buf. The array first has a var int indicating its length, followed by the actual bytes. The array has a length limit given by maxSize.
      Parameters:
      maxSize - the max length of the read array
      Returns:
      the read byte array
      Throws:
      DecoderException - if the read array has a length over maxSize
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(I)[B
      intermediary method_10803 Lnet/minecraft/class_2540;method_10803(I)[B
      named readByteArray Lnet/minecraft/network/PacketByteBuf;readByteArray(I)[B
    • writeIntArray

      public PacketByteBuf writeIntArray(int[] array)
      Writes an array of primitive ints to this buf. The array first has a var int indicating its length, followed by the var int entries.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      Implementation Note:
      An int array has the same format as a list of ints.
      Mappings:
      Namespace Name Mixin selector
      official a Log;a([I)Log;
      intermediary method_10806 Lnet/minecraft/class_2540;method_10806([I)Lnet/minecraft/class_2540;
      named writeIntArray Lnet/minecraft/network/PacketByteBuf;writeIntArray([I)Lnet/minecraft/network/PacketByteBuf;
    • readIntArray

      public int[] readIntArray()
      Reads an array of primitive ints from this buf. The array first has a var int indicating its length, followed by the var int entries. The array does not have a length limit.
      Returns:
      the read byte array
      See Also:
      Implementation Note:
      An int array has the same format as a list of ints.
      Mappings:
      Namespace Name Mixin selector
      official c Log;c()[I
      intermediary method_10787 Lnet/minecraft/class_2540;method_10787()[I
      named readIntArray Lnet/minecraft/network/PacketByteBuf;readIntArray()[I
    • readIntArray

      public int[] readIntArray(int maxSize)
      Reads an array of primitive ints from this buf. The array first has a var int indicating its length, followed by the var int entries. The array has a length limit given by maxSize.
      Parameters:
      maxSize - the max length of the read array
      Returns:
      the read byte array
      Throws:
      DecoderException - if the read array has a length over maxSize
      See Also:
      Implementation Note:
      An int array has the same format as a list of ints.
      Mappings:
      Namespace Name Mixin selector
      official c Log;c(I)[I
      intermediary method_10799 Lnet/minecraft/class_2540;method_10799(I)[I
      named readIntArray Lnet/minecraft/network/PacketByteBuf;readIntArray(I)[I
    • writeLongArray

      public PacketByteBuf writeLongArray(long[] array)
      Writes an array of primitive longs to this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values.
      Parameters:
      array - the array to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a([J)Log;
      intermediary method_10789 Lnet/minecraft/class_2540;method_10789([J)Lnet/minecraft/class_2540;
      named writeLongArray Lnet/minecraft/network/PacketByteBuf;writeLongArray([J)Lnet/minecraft/network/PacketByteBuf;
    • readLongArray

      public long[] readLongArray()
      Reads an array of primitive longs from this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values. The array does not have a length limit.
      Returns:
      the read long array
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Log;d()[J
      intermediary method_33134 Lnet/minecraft/class_2540;method_33134()[J
      named readLongArray Lnet/minecraft/network/PacketByteBuf;readLongArray()[J
    • readLongArray

      public long[] readLongArray(@Nullable @org.jetbrains.annotations.Nullable long[] toArray)
      Reads an array of primitive longs from this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values. The array does not have a length limit.

      Only when toArray is not null and toArray.length equals to the length var int read will the toArray be reused and returned; otherwise, a new array of proper size is created.

      Parameters:
      toArray - the array to reuse
      Returns:
      the read long array
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Log;b([J)[J
      intermediary method_10801 Lnet/minecraft/class_2540;method_10801([J)[J
      named readLongArray Lnet/minecraft/network/PacketByteBuf;readLongArray([J)[J
    • readLongArray

      public long[] readLongArray(@Nullable @org.jetbrains.annotations.Nullable long[] toArray, int maxSize)
      Reads an array of primitive longs from this buf. The array first has a var int indicating its length, followed by the regular long (not var long) values. The array has a length limit of maxSize.

      Only when toArray is not null and toArray.length equals to the length var int read will the toArray be reused and returned; otherwise, a new array of proper size is created.

      Parameters:
      toArray - the array to reuse
      maxSize - the max length of the read array
      Returns:
      the read long array
      Throws:
      DecoderException - if the read array has a length over maxSize
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a([JI)[J
      intermediary method_10809 Lnet/minecraft/class_2540;method_10809([JI)[J
      named readLongArray Lnet/minecraft/network/PacketByteBuf;readLongArray([JI)[J
    • getWrittenBytes

      public byte[] getWrittenBytes()
      Returns an array of bytes of contents in this buf between index 0 and the writerIndex().
      Mappings:
      Namespace Name Mixin selector
      official e Log;e()[B
      intermediary method_36132 Lnet/minecraft/class_2540;method_36132()[B
      named getWrittenBytes Lnet/minecraft/network/PacketByteBuf;getWrittenBytes()[B
    • readBlockPos

      public BlockPos readBlockPos()
      Reads a block position from this buf. A block position is represented by a regular long.
      Returns:
      the read block pos
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Log;f()Lgg;
      intermediary method_10811 Lnet/minecraft/class_2540;method_10811()Lnet/minecraft/class_2338;
      named readBlockPos Lnet/minecraft/network/PacketByteBuf;readBlockPos()Lnet/minecraft/util/math/BlockPos;
    • writeBlockPos

      public PacketByteBuf writeBlockPos(BlockPos pos)
      Writes a block position to this buf. A block position is represented by a regular long.
      Parameters:
      pos - the pos to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lgg;)Log;
      intermediary method_10807 Lnet/minecraft/class_2540;method_10807(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2540;
      named writeBlockPos Lnet/minecraft/network/PacketByteBuf;writeBlockPos(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/network/PacketByteBuf;
    • readChunkPos

      public ChunkPos readChunkPos()
      Reads a chunk position from this buf. A chunk position is represented by a regular long.
      Returns:
      the read chunk position
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Log;g()Lbvu;
      intermediary method_36133 Lnet/minecraft/class_2540;method_36133()Lnet/minecraft/class_1923;
      named readChunkPos Lnet/minecraft/network/PacketByteBuf;readChunkPos()Lnet/minecraft/util/math/ChunkPos;
    • writeChunkPos

      public PacketByteBuf writeChunkPos(ChunkPos pos)
      Writes a chunk position to this buf. A chunk position is represented by a regular long.
      Parameters:
      pos - the chunk position to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lbvu;)Log;
      intermediary method_36130 Lnet/minecraft/class_2540;method_36130(Lnet/minecraft/class_1923;)Lnet/minecraft/class_2540;
      named writeChunkPos Lnet/minecraft/network/PacketByteBuf;writeChunkPos(Lnet/minecraft/util/math/ChunkPos;)Lnet/minecraft/network/PacketByteBuf;
    • readChunkSectionPos

      public ChunkSectionPos readChunkSectionPos()
      Reads a chunk section position from this buf. A chunk section position is represented by a regular long.
      Returns:
      the read chunk section pos
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official h Log;h()Lgz;
      intermediary method_19456 Lnet/minecraft/class_2540;method_19456()Lnet/minecraft/class_4076;
      named readChunkSectionPos Lnet/minecraft/network/PacketByteBuf;readChunkSectionPos()Lnet/minecraft/util/math/ChunkSectionPos;
    • writeChunkSectionPos

      public PacketByteBuf writeChunkSectionPos(ChunkSectionPos pos)
      Reads a chunk section position from this buf. A chunk section position is represented by a regular long.
      Parameters:
      pos - the section position to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lgz;)Log;
      intermediary method_36131 Lnet/minecraft/class_2540;method_36131(Lnet/minecraft/class_4076;)Lnet/minecraft/class_2540;
      named writeChunkSectionPos Lnet/minecraft/network/PacketByteBuf;writeChunkSectionPos(Lnet/minecraft/util/math/ChunkSectionPos;)Lnet/minecraft/network/PacketByteBuf;
    • readText

      public Text readText()
      Reads a text from this buf. A text is represented by a JSON string with max length 262144.
      Returns:
      the read text
      Throws:
      DecoderException - if the JSON string read exceeds 262144 in length
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official i Log;i()Los;
      intermediary method_10808 Lnet/minecraft/class_2540;method_10808()Lnet/minecraft/class_2561;
      named readText Lnet/minecraft/network/PacketByteBuf;readText()Lnet/minecraft/text/Text;
    • writeText

      public PacketByteBuf writeText(Text text)
      Writes a text to this buf. A text is represented by a JSON string with max length 262144.
      Parameters:
      text - the text to write
      Returns:
      this buf, for chaining
      Throws:
      EncoderException - if the JSON string written exceeds 262144 in length
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Los;)Log;
      intermediary method_10805 Lnet/minecraft/class_2540;method_10805(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2540;
      named writeText Lnet/minecraft/network/PacketByteBuf;writeText(Lnet/minecraft/text/Text;)Lnet/minecraft/network/PacketByteBuf;
    • readEnumConstant

      public <T extends Enum<T>> T readEnumConstant(Class<T> enumClass)
      Reads an enum constant from this buf. An enum constant is represented by a var int indicating its ordinal.
      Parameters:
      enumClass - the enum class, for constant lookup
      Returns:
      the read enum constant
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/lang/Class;)Ljava/lang/Enum;
      intermediary method_10818 Lnet/minecraft/class_2540;method_10818(Ljava/lang/Class;)Ljava/lang/Enum;
      named readEnumConstant Lnet/minecraft/network/PacketByteBuf;readEnumConstant(Ljava/lang/Class;)Ljava/lang/Enum;
    • writeEnumConstant

      public PacketByteBuf writeEnumConstant(Enum<?> instance)
      Writes an enum constant to this buf. An enum constant is represented by a var int indicating its ordinal.
      Parameters:
      instance - the enum constant to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/lang/Enum;)Log;
      intermediary method_10817 Lnet/minecraft/class_2540;method_10817(Ljava/lang/Enum;)Lnet/minecraft/class_2540;
      named writeEnumConstant Lnet/minecraft/network/PacketByteBuf;writeEnumConstant(Ljava/lang/Enum;)Lnet/minecraft/network/PacketByteBuf;
    • readVarInt

      public int readVarInt()
      Reads a single var int from this buf.
      Returns:
      the value read
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official j Log;j()I
      intermediary method_10816 Lnet/minecraft/class_2540;method_10816()I
      named readVarInt Lnet/minecraft/network/PacketByteBuf;readVarInt()I
    • readVarLong

      public long readVarLong()
      Reads a single var long from this buf.
      Returns:
      the value read
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official k Log;k()J
      intermediary method_10792 Lnet/minecraft/class_2540;method_10792()J
      named readVarLong Lnet/minecraft/network/PacketByteBuf;readVarLong()J
    • writeUuid

      public PacketByteBuf writeUuid(UUID uuid)
      Writes a UUID (universally unique identifier) to this buf. A UUID is represented by two regular longs.
      Parameters:
      uuid - the UUID to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/UUID;)Log;
      intermediary method_10797 Lnet/minecraft/class_2540;method_10797(Ljava/util/UUID;)Lnet/minecraft/class_2540;
      named writeUuid Lnet/minecraft/network/PacketByteBuf;writeUuid(Ljava/util/UUID;)Lnet/minecraft/network/PacketByteBuf;
    • readUuid

      public UUID readUuid()
      Reads a UUID (universally unique identifier) from this buf. A UUID is represented by two regular longs.
      Returns:
      the read UUID
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Log;l()Ljava/util/UUID;
      intermediary method_10790 Lnet/minecraft/class_2540;method_10790()Ljava/util/UUID;
      named readUuid Lnet/minecraft/network/PacketByteBuf;readUuid()Ljava/util/UUID;
    • writeVarInt

      public PacketByteBuf writeVarInt(int value)
      Writes a single var int to this buf.

      Compared to regular ints, var ints may use less bytes (ranging from 1 to 5, where regular ints use 4) when representing smaller positive numbers.

      Parameters:
      value - the value to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Log;d(I)Log;
      intermediary method_10804 Lnet/minecraft/class_2540;method_10804(I)Lnet/minecraft/class_2540;
      named writeVarInt Lnet/minecraft/network/PacketByteBuf;writeVarInt(I)Lnet/minecraft/network/PacketByteBuf;
    • writeVarLong

      public PacketByteBuf writeVarLong(long value)
      Writes a single var long to this buf.

      Compared to regular longs, var longs may use less bytes when representing smaller positive numbers.

      Parameters:
      value - the value to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Log;b(J)Log;
      intermediary method_10791 Lnet/minecraft/class_2540;method_10791(J)Lnet/minecraft/class_2540;
      named writeVarLong Lnet/minecraft/network/PacketByteBuf;writeVarLong(J)Lnet/minecraft/network/PacketByteBuf;
    • writeNbt

      public PacketByteBuf writeNbt(@Nullable @Nullable NbtCompound compound)
      Writes an NBT compound to this buf. The binary representation of NBT is handled by NbtIo. If compound is null, it is treated as an NBT null.
      Parameters:
      compound - the compound to write
      Returns:
      this buf, for chaining
      Throws:
      EncoderException - if the NBT cannot be written
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lna;)Log;
      intermediary method_10794 Lnet/minecraft/class_2540;method_10794(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2540;
      named writeNbt Lnet/minecraft/network/PacketByteBuf;writeNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/network/PacketByteBuf;
    • readNbt

      @Nullable public @Nullable NbtCompound readNbt()
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound can have a maximum size of 2097152 bytes.
      Returns:
      the read compound, may be null
      Throws:
      EncoderException - if the NBT cannot be read
      RuntimeException - if the compound exceeds the allowed maximum size
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official m Log;m()Lna;
      intermediary method_10798 Lnet/minecraft/class_2540;method_10798()Lnet/minecraft/class_2487;
      named readNbt Lnet/minecraft/network/PacketByteBuf;readNbt()Lnet/minecraft/nbt/NbtCompound;
    • readUnlimitedNbt

      @Nullable public @Nullable NbtCompound readUnlimitedNbt()
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound does not have a size limit.
      Returns:
      the read compound, may be null
      Throws:
      EncoderException - if the NBT cannot be read
      See Also:
      API Note:
      Since this version does not have a size limit, it may be vulnerable to malicious NBT spam attacks.
      Mappings:
      Namespace Name Mixin selector
      official n Log;n()Lna;
      intermediary method_30617 Lnet/minecraft/class_2540;method_30617()Lnet/minecraft/class_2487;
      named readUnlimitedNbt Lnet/minecraft/network/PacketByteBuf;readUnlimitedNbt()Lnet/minecraft/nbt/NbtCompound;
    • readNbt

      @Nullable public @Nullable NbtCompound readNbt(NbtTagSizeTracker sizeTracker)
      Reads an NBT compound from this buf. The binary representation of NBT is handled by NbtIo. If an NBT null is encountered, this method returns null. The compound can have a maximum size controlled by the sizeTracker.
      Returns:
      the read compound, may be null
      Throws:
      EncoderException - if the NBT cannot be read
      RuntimeException - if the compound exceeds the allowed maximum size
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lnj;)Lna;
      intermediary method_30616 Lnet/minecraft/class_2540;method_30616(Lnet/minecraft/class_2505;)Lnet/minecraft/class_2487;
      named readNbt Lnet/minecraft/network/PacketByteBuf;readNbt(Lnet/minecraft/nbt/NbtTagSizeTracker;)Lnet/minecraft/nbt/NbtCompound;
    • writeItemStack

      public PacketByteBuf writeItemStack(ItemStack stack)
      Writes an item stack to this buf. An item stack is represented by a boolean indicating whether it exists; if it exists, it is followed by a var int for its raw id, a byte for its count, and an NBT compound for its tag.
      Parameters:
      stack - the stack to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lbqp;)Log;
      intermediary method_10793 Lnet/minecraft/class_2540;method_10793(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2540;
      named writeItemStack Lnet/minecraft/network/PacketByteBuf;writeItemStack(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/network/PacketByteBuf;
    • readItemStack

      public ItemStack readItemStack()
      Reads an item stack from this buf. An item stack is represented by a boolean indicating whether it exists; if it exists, it is followed by a var int for its raw id, a byte for its count, and an NBT compound for its tag.
      Returns:
      the read item stack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official o Log;o()Lbqp;
      intermediary method_10819 Lnet/minecraft/class_2540;method_10819()Lnet/minecraft/class_1799;
      named readItemStack Lnet/minecraft/network/PacketByteBuf;readItemStack()Lnet/minecraft/item/ItemStack;
    • readString

      public String readString()
      Reads a string from this buf. A string is represented by a byte array of its UTF-8 data. The string can have a maximum length of 32767.
      Returns:
      the string read
      Throws:
      DecoderException - if the string read exceeds the maximum length
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official p Log;p()Ljava/lang/String;
      intermediary method_19772 Lnet/minecraft/class_2540;method_19772()Ljava/lang/String;
      named readString Lnet/minecraft/network/PacketByteBuf;readString()Ljava/lang/String;
    • readString

      public String readString(int maxLength)
      Reads a string from this buf. A string is represented by a byte array of its UTF-8 data. The string can have a maximum length of maxLength.
      Parameters:
      maxLength - the maximum length of the string read
      Returns:
      the string read
      Throws:
      DecoderException - if the string read is longer than maxLength
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Log;e(I)Ljava/lang/String;
      intermediary method_10800 Lnet/minecraft/class_2540;method_10800(I)Ljava/lang/String;
      named readString Lnet/minecraft/network/PacketByteBuf;readString(I)Ljava/lang/String;
    • writeString

      public PacketByteBuf writeString(String string)
      Writes a string to this buf. A string is represented by a byte array of its UTF-8 data. That byte array can have a maximum length of 32767.
      Parameters:
      string - the string to write
      Returns:
      this buf, for chaining
      Throws:
      EncoderException - if the byte array of the string to write is longer than 32767
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/lang/String;)Log;
      intermediary method_10814 Lnet/minecraft/class_2540;method_10814(Ljava/lang/String;)Lnet/minecraft/class_2540;
      named writeString Lnet/minecraft/network/PacketByteBuf;writeString(Ljava/lang/String;)Lnet/minecraft/network/PacketByteBuf;
    • writeString

      public PacketByteBuf writeString(String string, int maxLength)
      Writes a string to this buf. A string is represented by a byte array of its UTF-8 data. That byte array can have a maximum length of maxLength.
      Parameters:
      string - the string to write
      maxLength - the max length of the byte array
      Returns:
      this buf, for chaining
      Throws:
      EncoderException - if the byte array of the string to write is longer than maxLength
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/lang/String;I)Log;
      intermediary method_10788 Lnet/minecraft/class_2540;method_10788(Ljava/lang/String;I)Lnet/minecraft/class_2540;
      named writeString Lnet/minecraft/network/PacketByteBuf;writeString(Ljava/lang/String;I)Lnet/minecraft/network/PacketByteBuf;
    • readIdentifier

      public Identifier readIdentifier()
      Reads an identifier from this buf. An identifier is represented by its string form. The read identifier's string form can have a max length of 32767.
      Returns:
      the read identifier
      Throws:
      DecoderException - if the identifier's string form is longer than 32767
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official q Log;q()Lww;
      intermediary method_10810 Lnet/minecraft/class_2540;method_10810()Lnet/minecraft/class_2960;
      named readIdentifier Lnet/minecraft/network/PacketByteBuf;readIdentifier()Lnet/minecraft/util/Identifier;
    • writeIdentifier

      public PacketByteBuf writeIdentifier(Identifier id)
      Writes an identifier to this buf. An identifier is represented by its string form. The written identifier's byte array can have a max length of 32767.
      Parameters:
      id - the identifier to write
      Returns:
      the read identifier
      Throws:
      EncoderException - if the id's byte array is longer than 32767
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Lww;)Log;
      intermediary method_10812 Lnet/minecraft/class_2540;method_10812(Lnet/minecraft/class_2960;)Lnet/minecraft/class_2540;
      named writeIdentifier Lnet/minecraft/network/PacketByteBuf;writeIdentifier(Lnet/minecraft/util/Identifier;)Lnet/minecraft/network/PacketByteBuf;
    • readDate

      public Date readDate()
      Reads a date from this buf. A date is represented by its time, a regular long.
      Returns:
      the read date
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official r Log;r()Ljava/util/Date;
      intermediary method_10802 Lnet/minecraft/class_2540;method_10802()Ljava/util/Date;
      named readDate Lnet/minecraft/network/PacketByteBuf;readDate()Ljava/util/Date;
    • writeDate

      public PacketByteBuf writeDate(Date date)
      Writes a date to this buf. A date is represented by its time, a regular long.
      Parameters:
      date - the date to write
      Returns:
      this buf, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/Date;)Log;
      intermediary method_10796 Lnet/minecraft/class_2540;method_10796(Ljava/util/Date;)Lnet/minecraft/class_2540;
      named writeDate Lnet/minecraft/network/PacketByteBuf;writeDate(Ljava/util/Date;)Lnet/minecraft/network/PacketByteBuf;
    • readBlockHitResult

      public BlockHitResult readBlockHitResult()
      Reads a block hit result from this buf. A block hit result is represented by a block position, a direction enum constant, 3 floats for the hit offset position, and a boolean for whether the hit was inside a block.
      Returns:
      the read block hit result
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official s Log;s()Ldmw;
      intermediary method_17814 Lnet/minecraft/class_2540;method_17814()Lnet/minecraft/class_3965;
      named readBlockHitResult Lnet/minecraft/network/PacketByteBuf;readBlockHitResult()Lnet/minecraft/util/hit/BlockHitResult;
    • writeBlockHitResult

      public void writeBlockHitResult(BlockHitResult hitResult)
      Writes a block hit result to this buf. A block hit result is represented by a block position, a direction enum constant, 3 floats for the hit offset position, and a boolean for whether the hit was inside a block.
      Parameters:
      hitResult - the block hit result to write
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ldmw;)V
      intermediary method_17813 Lnet/minecraft/class_2540;method_17813(Lnet/minecraft/class_3965;)V
      named writeBlockHitResult Lnet/minecraft/network/PacketByteBuf;writeBlockHitResult(Lnet/minecraft/util/hit/BlockHitResult;)V
    • readBitSet

      public BitSet readBitSet()
      Reads a bit set from this buf. A bit set is represented by a long array.
      Returns:
      the read bit set
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official t Log;t()Ljava/util/BitSet;
      intermediary method_33558 Lnet/minecraft/class_2540;method_33558()Ljava/util/BitSet;
      named readBitSet Lnet/minecraft/network/PacketByteBuf;readBitSet()Ljava/util/BitSet;
    • writeBitSet

      public void writeBitSet(BitSet bitSet)
      Writes a bit set to this buf. A bit set is represented by a long array.
      Parameters:
      bitSet - the bit set to write
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Log;a(Ljava/util/BitSet;)V
      intermediary method_33557 Lnet/minecraft/class_2540;method_33557(Ljava/util/BitSet;)V
      named writeBitSet Lnet/minecraft/network/PacketByteBuf;writeBitSet(Ljava/util/BitSet;)V
    • capacity

      public int capacity()
      Specified by:
      capacity in class ByteBuf
    • capacity

      public ByteBuf capacity(int int2)
      Specified by:
      capacity in class ByteBuf
    • maxCapacity

      public int maxCapacity()
      Specified by:
      maxCapacity in class ByteBuf
    • alloc

      public ByteBufAllocator alloc()
      Specified by:
      alloc in class ByteBuf
    • order

      public ByteOrder order()
      Specified by:
      order in class ByteBuf
    • order

      public ByteBuf order(ByteOrder byteOrder)
      Specified by:
      order in class ByteBuf
    • unwrap

      public ByteBuf unwrap()
      Specified by:
      unwrap in class ByteBuf
    • isDirect

      public boolean isDirect()
      Specified by:
      isDirect in class ByteBuf
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in class ByteBuf
    • asReadOnly

      public ByteBuf asReadOnly()
      Specified by:
      asReadOnly in class ByteBuf
    • readerIndex

      public int readerIndex()
      Specified by:
      readerIndex in class ByteBuf
    • readerIndex

      public ByteBuf readerIndex(int int2)
      Specified by:
      readerIndex in class ByteBuf
    • writerIndex

      public int writerIndex()
      Specified by:
      writerIndex in class ByteBuf
    • writerIndex

      public ByteBuf writerIndex(int int2)
      Specified by:
      writerIndex in class ByteBuf
    • setIndex

      public ByteBuf setIndex(int int2, int int3)
      Specified by:
      setIndex in class ByteBuf
    • readableBytes

      public int readableBytes()
      Specified by:
      readableBytes in class ByteBuf
    • writableBytes

      public int writableBytes()
      Specified by:
      writableBytes in class ByteBuf
    • maxWritableBytes

      public int maxWritableBytes()
      Specified by:
      maxWritableBytes in class ByteBuf
    • isReadable

      public boolean isReadable()
      Specified by:
      isReadable in class ByteBuf
    • isReadable

      public boolean isReadable(int int2)
      Specified by:
      isReadable in class ByteBuf
    • isWritable

      public boolean isWritable()
      Specified by:
      isWritable in class ByteBuf
    • isWritable

      public boolean isWritable(int int2)
      Specified by:
      isWritable in class ByteBuf
    • clear

      public ByteBuf clear()
      Specified by:
      clear in class ByteBuf
    • markReaderIndex

      public ByteBuf markReaderIndex()
      Specified by:
      markReaderIndex in class ByteBuf
    • resetReaderIndex

      public ByteBuf resetReaderIndex()
      Specified by:
      resetReaderIndex in class ByteBuf
    • markWriterIndex

      public ByteBuf markWriterIndex()
      Specified by:
      markWriterIndex in class ByteBuf
    • resetWriterIndex

      public ByteBuf resetWriterIndex()
      Specified by:
      resetWriterIndex in class ByteBuf
    • discardReadBytes

      public ByteBuf discardReadBytes()
      Specified by:
      discardReadBytes in class ByteBuf
    • discardSomeReadBytes

      public ByteBuf discardSomeReadBytes()
      Specified by:
      discardSomeReadBytes in class ByteBuf
    • ensureWritable

      public ByteBuf ensureWritable(int int2)
      Specified by:
      ensureWritable in class ByteBuf
    • ensureWritable

      public int ensureWritable(int int2, boolean bool)
      Specified by:
      ensureWritable in class ByteBuf
    • getBoolean

      public boolean getBoolean(int int2)
      Specified by:
      getBoolean in class ByteBuf
    • getByte

      public byte getByte(int int2)
      Specified by:
      getByte in class ByteBuf
    • getUnsignedByte

      public short getUnsignedByte(int int2)
      Specified by:
      getUnsignedByte in class ByteBuf
    • getShort

      public short getShort(int int2)
      Specified by:
      getShort in class ByteBuf
    • getShortLE

      public short getShortLE(int int2)
      Specified by:
      getShortLE in class ByteBuf
    • getUnsignedShort

      public int getUnsignedShort(int int2)
      Specified by:
      getUnsignedShort in class ByteBuf
    • getUnsignedShortLE

      public int getUnsignedShortLE(int int2)
      Specified by:
      getUnsignedShortLE in class ByteBuf
    • getMedium

      public int getMedium(int int2)
      Specified by:
      getMedium in class ByteBuf
    • getMediumLE

      public int getMediumLE(int int2)
      Specified by:
      getMediumLE in class ByteBuf
    • getUnsignedMedium

      public int getUnsignedMedium(int int2)
      Specified by:
      getUnsignedMedium in class ByteBuf
    • getUnsignedMediumLE

      public int getUnsignedMediumLE(int int2)
      Specified by:
      getUnsignedMediumLE in class ByteBuf
    • getInt

      public int getInt(int int2)
      Specified by:
      getInt in class ByteBuf
    • getIntLE

      public int getIntLE(int int2)
      Specified by:
      getIntLE in class ByteBuf
    • getUnsignedInt

      public long getUnsignedInt(int int2)
      Specified by:
      getUnsignedInt in class ByteBuf
    • getUnsignedIntLE

      public long getUnsignedIntLE(int int2)
      Specified by:
      getUnsignedIntLE in class ByteBuf
    • getLong

      public long getLong(int int2)
      Specified by:
      getLong in class ByteBuf
    • getLongLE

      public long getLongLE(int int2)
      Specified by:
      getLongLE in class ByteBuf
    • getChar

      public char getChar(int int2)
      Specified by:
      getChar in class ByteBuf
    • getFloat

      public float getFloat(int int2)
      Specified by:
      getFloat in class ByteBuf
    • getDouble

      public double getDouble(int int2)
      Specified by:
      getDouble in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, ByteBuf byteBuf)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, ByteBuf byteBuf, int int3)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, ByteBuf byteBuf, int int3, int int4)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, byte[] byte2)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, byte[] byte2, int int3, int int4)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, ByteBuffer byteBuffer)
      Specified by:
      getBytes in class ByteBuf
    • getBytes

      public ByteBuf getBytes(int int2, OutputStream outputStream, int int3) throws IOException
      Specified by:
      getBytes in class ByteBuf
      Throws:
      IOException
    • getBytes

      public int getBytes(int int2, GatheringByteChannel gatheringByteChannel, int int3) throws IOException
      Specified by:
      getBytes in class ByteBuf
      Throws:
      IOException
    • getBytes

      public int getBytes(int int2, FileChannel fileChannel, long long2, int int3) throws IOException
      Specified by:
      getBytes in class ByteBuf
      Throws:
      IOException
    • getCharSequence

      public CharSequence getCharSequence(int int2, int int3, Charset charset)
      Specified by:
      getCharSequence in class ByteBuf
    • setBoolean

      public ByteBuf setBoolean(int int2, boolean bool)
      Specified by:
      setBoolean in class ByteBuf
    • setByte

      public ByteBuf setByte(int int2, int int3)
      Specified by:
      setByte in class ByteBuf
    • setShort

      public ByteBuf setShort(int int2, int int3)
      Specified by:
      setShort in class ByteBuf
    • setShortLE

      public ByteBuf setShortLE(int int2, int int3)
      Specified by:
      setShortLE in class ByteBuf
    • setMedium

      public ByteBuf setMedium(int int2, int int3)
      Specified by:
      setMedium in class ByteBuf
    • setMediumLE

      public ByteBuf setMediumLE(int int2, int int3)
      Specified by:
      setMediumLE in class ByteBuf
    • setInt

      public ByteBuf setInt(int int2, int int3)
      Specified by:
      setInt in class ByteBuf
    • setIntLE

      public ByteBuf setIntLE(int int2, int int3)
      Specified by:
      setIntLE in class ByteBuf
    • setLong

      public ByteBuf setLong(int int2, long long2)
      Specified by:
      setLong in class ByteBuf
    • setLongLE

      public ByteBuf setLongLE(int int2, long long2)
      Specified by:
      setLongLE in class ByteBuf
    • setChar

      public ByteBuf setChar(int int2, int int3)
      Specified by:
      setChar in class ByteBuf
    • setFloat

      public ByteBuf setFloat(int int2, float float2)
      Specified by:
      setFloat in class ByteBuf
    • setDouble

      public ByteBuf setDouble(int int2, double double2)
      Specified by:
      setDouble in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, ByteBuf byteBuf)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, ByteBuf byteBuf, int int3)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, ByteBuf byteBuf, int int3, int int4)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, byte[] byte2)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, byte[] byte2, int int3, int int4)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public ByteBuf setBytes(int int2, ByteBuffer byteBuffer)
      Specified by:
      setBytes in class ByteBuf
    • setBytes

      public int setBytes(int int2, InputStream inputStream, int int3) throws IOException
      Specified by:
      setBytes in class ByteBuf
      Throws:
      IOException
    • setBytes

      public int setBytes(int int2, ScatteringByteChannel scatteringByteChannel, int int3) throws IOException
      Specified by:
      setBytes in class ByteBuf
      Throws:
      IOException
    • setBytes

      public int setBytes(int int2, FileChannel fileChannel, long long2, int int3) throws IOException
      Specified by:
      setBytes in class ByteBuf
      Throws:
      IOException
    • setZero

      public ByteBuf setZero(int int2, int int3)
      Specified by:
      setZero in class ByteBuf
    • setCharSequence

      public int setCharSequence(int int2, CharSequence charSequence, Charset charset)
      Specified by:
      setCharSequence in class ByteBuf
    • readBoolean

      public boolean readBoolean()
      Specified by:
      readBoolean in class ByteBuf
    • readByte

      public byte readByte()
      Specified by:
      readByte in class ByteBuf
    • readUnsignedByte

      public short readUnsignedByte()
      Specified by:
      readUnsignedByte in class ByteBuf
    • readShort

      public short readShort()
      Specified by:
      readShort in class ByteBuf
    • readShortLE

      public short readShortLE()
      Specified by:
      readShortLE in class ByteBuf
    • readUnsignedShort

      public int readUnsignedShort()
      Specified by:
      readUnsignedShort in class ByteBuf
    • readUnsignedShortLE

      public int readUnsignedShortLE()
      Specified by:
      readUnsignedShortLE in class ByteBuf
    • readMedium

      public int readMedium()
      Specified by:
      readMedium in class ByteBuf
    • readMediumLE

      public int readMediumLE()
      Specified by:
      readMediumLE in class ByteBuf
    • readUnsignedMedium

      public int readUnsignedMedium()
      Specified by:
      readUnsignedMedium in class ByteBuf
    • readUnsignedMediumLE

      public int readUnsignedMediumLE()
      Specified by:
      readUnsignedMediumLE in class ByteBuf
    • readInt

      public int readInt()
      Specified by:
      readInt in class ByteBuf
    • readIntLE

      public int readIntLE()
      Specified by:
      readIntLE in class ByteBuf
    • readUnsignedInt

      public long readUnsignedInt()
      Specified by:
      readUnsignedInt in class ByteBuf
    • readUnsignedIntLE

      public long readUnsignedIntLE()
      Specified by:
      readUnsignedIntLE in class ByteBuf
    • readLong

      public long readLong()
      Specified by:
      readLong in class ByteBuf
    • readLongLE

      public long readLongLE()
      Specified by:
      readLongLE in class ByteBuf
    • readChar

      public char readChar()
      Specified by:
      readChar in class ByteBuf
    • readFloat

      public float readFloat()
      Specified by:
      readFloat in class ByteBuf
    • readDouble

      public double readDouble()
      Specified by:
      readDouble in class ByteBuf
    • readBytes

      public ByteBuf readBytes(int int2)
      Specified by:
      readBytes in class ByteBuf
    • readSlice

      public ByteBuf readSlice(int int2)
      Specified by:
      readSlice in class ByteBuf
    • readRetainedSlice

      public ByteBuf readRetainedSlice(int int2)
      Specified by:
      readRetainedSlice in class ByteBuf
    • readBytes

      public ByteBuf readBytes(ByteBuf byteBuf)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(ByteBuf byteBuf, int int2)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(ByteBuf byteBuf, int int2, int int3)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(byte[] byte2)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(byte[] byte2, int int2, int int3)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(ByteBuffer byteBuffer)
      Specified by:
      readBytes in class ByteBuf
    • readBytes

      public ByteBuf readBytes(OutputStream outputStream, int int2) throws IOException
      Specified by:
      readBytes in class ByteBuf
      Throws:
      IOException
    • readBytes

      public int readBytes(GatheringByteChannel gatheringByteChannel, int int2) throws IOException
      Specified by:
      readBytes in class ByteBuf
      Throws:
      IOException
    • readCharSequence

      public CharSequence readCharSequence(int int2, Charset charset)
      Specified by:
      readCharSequence in class ByteBuf
    • readBytes

      public int readBytes(FileChannel fileChannel, long long2, int int2) throws IOException
      Specified by:
      readBytes in class ByteBuf
      Throws:
      IOException
    • skipBytes

      public ByteBuf skipBytes(int int2)
      Specified by:
      skipBytes in class ByteBuf
    • writeBoolean

      public ByteBuf writeBoolean(boolean bool)
      Specified by:
      writeBoolean in class ByteBuf
    • writeByte

      public ByteBuf writeByte(int int2)
      Specified by:
      writeByte in class ByteBuf
    • writeShort

      public ByteBuf writeShort(int int2)
      Specified by:
      writeShort in class ByteBuf
    • writeShortLE

      public ByteBuf writeShortLE(int int2)
      Specified by:
      writeShortLE in class ByteBuf
    • writeMedium

      public ByteBuf writeMedium(int int2)
      Specified by:
      writeMedium in class ByteBuf
    • writeMediumLE

      public ByteBuf writeMediumLE(int int2)
      Specified by:
      writeMediumLE in class ByteBuf
    • writeInt

      public ByteBuf writeInt(int int2)
      Specified by:
      writeInt in class ByteBuf
    • writeIntLE

      public ByteBuf writeIntLE(int int2)
      Specified by:
      writeIntLE in class ByteBuf
    • writeLong

      public ByteBuf writeLong(long long2)
      Specified by:
      writeLong in class ByteBuf
    • writeLongLE

      public ByteBuf writeLongLE(long long2)
      Specified by:
      writeLongLE in class ByteBuf
    • writeChar

      public ByteBuf writeChar(int int2)
      Specified by:
      writeChar in class ByteBuf
    • writeFloat

      public ByteBuf writeFloat(float float2)
      Specified by:
      writeFloat in class ByteBuf
    • writeDouble

      public ByteBuf writeDouble(double double2)
      Specified by:
      writeDouble in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(ByteBuf byteBuf)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(ByteBuf byteBuf, int int2)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(ByteBuf byteBuf, int int2, int int3)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(byte[] byte2)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(byte[] byte2, int int2, int int3)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public ByteBuf writeBytes(ByteBuffer byteBuffer)
      Specified by:
      writeBytes in class ByteBuf
    • writeBytes

      public int writeBytes(InputStream inputStream, int int2) throws IOException
      Specified by:
      writeBytes in class ByteBuf
      Throws:
      IOException
    • writeBytes

      public int writeBytes(ScatteringByteChannel scatteringByteChannel, int int2) throws IOException
      Specified by:
      writeBytes in class ByteBuf
      Throws:
      IOException
    • writeBytes

      public int writeBytes(FileChannel fileChannel, long long2, int int2) throws IOException
      Specified by:
      writeBytes in class ByteBuf
      Throws:
      IOException
    • writeZero

      public ByteBuf writeZero(int int2)
      Specified by:
      writeZero in class ByteBuf
    • writeCharSequence

      public int writeCharSequence(CharSequence charSequence, Charset charset)
      Specified by:
      writeCharSequence in class ByteBuf
    • indexOf

      public int indexOf(int int2, int int3, byte byte2)
      Specified by:
      indexOf in class ByteBuf
    • bytesBefore

      public int bytesBefore(byte byte2)
      Specified by:
      bytesBefore in class ByteBuf
    • bytesBefore

      public int bytesBefore(int int2, byte byte2)
      Specified by:
      bytesBefore in class ByteBuf
    • bytesBefore

      public int bytesBefore(int int2, int int3, byte byte2)
      Specified by:
      bytesBefore in class ByteBuf
    • forEachByte

      public int forEachByte(ByteProcessor byteProcessor)
      Specified by:
      forEachByte in class ByteBuf
    • forEachByte

      public int forEachByte(int int2, int int3, ByteProcessor byteProcessor)
      Specified by:
      forEachByte in class ByteBuf
    • forEachByteDesc

      public int forEachByteDesc(ByteProcessor byteProcessor)
      Specified by:
      forEachByteDesc in class ByteBuf
    • forEachByteDesc

      public int forEachByteDesc(int int2, int int3, ByteProcessor byteProcessor)
      Specified by:
      forEachByteDesc in class ByteBuf
    • copy

      public ByteBuf copy()
      Specified by:
      copy in class ByteBuf
    • copy

      public ByteBuf copy(int int2, int int3)
      Specified by:
      copy in class ByteBuf
    • slice

      public ByteBuf slice()
      Specified by:
      slice in class ByteBuf
    • retainedSlice

      public ByteBuf retainedSlice()
      Specified by:
      retainedSlice in class ByteBuf
    • slice

      public ByteBuf slice(int int2, int int3)
      Specified by:
      slice in class ByteBuf
    • retainedSlice

      public ByteBuf retainedSlice(int int2, int int3)
      Specified by:
      retainedSlice in class ByteBuf
    • duplicate

      public ByteBuf duplicate()
      Specified by:
      duplicate in class ByteBuf
    • retainedDuplicate

      public ByteBuf retainedDuplicate()
      Specified by:
      retainedDuplicate in class ByteBuf
    • nioBufferCount

      public int nioBufferCount()
      Specified by:
      nioBufferCount in class ByteBuf
    • nioBuffer

      public ByteBuffer nioBuffer()
      Specified by:
      nioBuffer in class ByteBuf
    • nioBuffer

      public ByteBuffer nioBuffer(int int2, int int3)
      Specified by:
      nioBuffer in class ByteBuf
    • internalNioBuffer

      public ByteBuffer internalNioBuffer(int int2, int int3)
      Specified by:
      internalNioBuffer in class ByteBuf
    • nioBuffers

      public ByteBuffer[] nioBuffers()
      Specified by:
      nioBuffers in class ByteBuf
    • nioBuffers

      public ByteBuffer[] nioBuffers(int int2, int int3)
      Specified by:
      nioBuffers in class ByteBuf
    • hasArray

      public boolean hasArray()
      Specified by:
      hasArray in class ByteBuf
    • array

      public byte[] array()
      Specified by:
      array in class ByteBuf
    • arrayOffset

      public int arrayOffset()
      Specified by:
      arrayOffset in class ByteBuf
    • hasMemoryAddress

      public boolean hasMemoryAddress()
      Specified by:
      hasMemoryAddress in class ByteBuf
    • memoryAddress

      public long memoryAddress()
      Specified by:
      memoryAddress in class ByteBuf
    • toString

      public String toString(Charset charset)
      Specified by:
      toString in class ByteBuf
    • toString

      public String toString(int int2, int int3, Charset charset)
      Specified by:
      toString in class ByteBuf
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class ByteBuf
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official equals Log;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2540;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/network/PacketByteBuf;equals(Ljava/lang/Object;)Z
    • compareTo

      public int compareTo(ByteBuf byteBuf)
      Specified by:
      compareTo in interface Comparable<ByteBuf>
      Specified by:
      compareTo in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official compareTo Log;compareTo(Lio/netty/buffer/ByteBuf;)I
      intermediary compareTo Lnet/minecraft/class_2540;compareTo(Lio/netty/buffer/ByteBuf;)I
      named compareTo Lnet/minecraft/network/PacketByteBuf;compareTo(Lio/netty/buffer/ByteBuf;)I
    • toString

      public String toString()
      Specified by:
      toString in class ByteBuf
    • retain

      public ByteBuf retain(int int2)
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official retain Log;retain(I)Lio/netty/buffer/ByteBuf;
      intermediary retain Lnet/minecraft/class_2540;retain(I)Lio/netty/buffer/ByteBuf;
      named retain Lnet/minecraft/network/PacketByteBuf;retain(I)Lio/netty/buffer/ByteBuf;
    • retain

      public ByteBuf retain()
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official retain Log;retain()Lio/netty/buffer/ByteBuf;
      intermediary retain Lnet/minecraft/class_2540;retain()Lio/netty/buffer/ByteBuf;
      named retain Lnet/minecraft/network/PacketByteBuf;retain()Lio/netty/buffer/ByteBuf;
    • touch

      public ByteBuf touch()
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official touch Log;touch()Lio/netty/buffer/ByteBuf;
      intermediary touch Lnet/minecraft/class_2540;touch()Lio/netty/buffer/ByteBuf;
      named touch Lnet/minecraft/network/PacketByteBuf;touch()Lio/netty/buffer/ByteBuf;
    • touch

      public ByteBuf touch(Object object)
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
      Mappings:
      Namespace Name Mixin selector
      official touch Log;touch(Ljava/lang/Object;)Lio/netty/buffer/ByteBuf;
      intermediary touch Lnet/minecraft/class_2540;touch(Ljava/lang/Object;)Lio/netty/buffer/ByteBuf;
      named touch Lnet/minecraft/network/PacketByteBuf;touch(Ljava/lang/Object;)Lio/netty/buffer/ByteBuf;
    • refCnt

      public int refCnt()
    • release

      public boolean release()
    • release

      public boolean release(int int2)