FriendlyByteBuf.java

net.minecraft.network.FriendlyByteBuf

信息

  • 全限定名:net.minecraft.network.FriendlyByteBuf
  • 类型:public class
  • 包:net.minecraft.network
  • 源码路径:src/main/java/net/minecraft/network/FriendlyByteBuf.java
  • 起始行号:L71
  • 继承:ByteBuf
  • 职责:

    TODO

字段/常量

  • source

    • 类型: ByteBuf
    • 修饰符: private final
    • 源码定位: L72
    • 说明:

      TODO

  • MAX_STRING_LENGTH

    • 类型: short
    • 修饰符: public static final
    • 源码定位: L73
    • 说明:

      TODO

  • MAX_COMPONENT_STRING_LENGTH

    • 类型: int
    • 修饰符: public static final
    • 源码定位: L74
    • 说明:

      TODO

  • PUBLIC_KEY_SIZE

    • 类型: int
    • 修饰符: private static final
    • 源码定位: L75
    • 说明:

      TODO

  • MAX_PUBLIC_KEY_HEADER_SIZE

    • 类型: int
    • 修饰符: private static final
    • 源码定位: L76
    • 说明:

      TODO

  • MAX_PUBLIC_KEY_LENGTH

    • 类型: int
    • 修饰符: private static final
    • 源码定位: L77
    • 说明:

      TODO

  • GSON

    • 类型: Gson
    • 修饰符: private static final
    • 源码定位: L78
    • 说明:

      TODO

内部类/嵌套类型

构造器

public FriendlyByteBuf(ByteBuf source) @ L80

  • 构造器名:FriendlyByteBuf
  • 源码定位:L80
  • 修饰符:public

参数:

  • source: ByteBuf

说明:

TODO

方法

下面的方法块按源码顺序生成。

public <T> T readWithCodecTrusted(DynamicOps<Tag> ops, Codec<T> codec) @ L84

  • 方法名:readWithCodecTrusted
  • 源码定位:L84
  • 返回类型: T
  • 修饰符:public

参数:

  • ops: DynamicOps
  • codec: Codec

说明:

TODO

public <T> T readWithCodec(DynamicOps<Tag> ops, Codec<T> codec, NbtAccounter accounter) @ L89

  • 方法名:readWithCodec
  • 源码定位:L89
  • 返回类型: T
  • 修饰符:public

参数:

  • ops: DynamicOps
  • codec: Codec
  • accounter: NbtAccounter

说明:

TODO

public <T> FriendlyByteBuf writeWithCodec(DynamicOps<Tag> ops, Codec<T> codec, T value) @ L95

  • 方法名:writeWithCodec
  • 源码定位:L95
  • 返回类型: FriendlyByteBuf
  • 修饰符:public

参数:

  • ops: DynamicOps
  • codec: Codec
  • value: T

说明:

TODO

public <T> T readLenientJsonWithCodec(Codec<T> codec) @ L102

  • 方法名:readLenientJsonWithCodec
  • 源码定位:L102
  • 返回类型: T
  • 修饰符:public

参数:

  • codec: Codec

说明:

TODO

public <T> void writeJsonWithCodec(Codec<T> codec, T value) @ L108

  • 方法名:writeJsonWithCodec
  • 源码定位:L108
  • 返回类型: void
  • 修饰符:public

参数:

  • codec: Codec
  • value: T

说明:

TODO

public static <T> IntFunction<T> limitValue(IntFunction<T> original, int limit) @ L113

  • 方法名:limitValue
  • 源码定位:L113
  • 返回类型: IntFunction
  • 修饰符:public static

参数:

  • original: IntFunction
  • limit: int

说明:

TODO

public <T,C extends Collection<T>> C readCollection(IntFunction<C> ctor, StreamDecoder<?super FriendlyByteBuf,T> elementDecoder) @ L123

  • 方法名:readCollection
  • 源码定位:L123
  • 返回类型:<T,C extends Collection> C
  • 修饰符:public

参数:

  • ctor: IntFunction
  • elementDecoder: StreamDecoder<?super FriendlyByteBuf,T>

说明:

TODO

public <T> void writeCollection(Collection<T> collection, StreamEncoder<?super FriendlyByteBuf,T> encoder) @ L134

  • 方法名:writeCollection
  • 源码定位:L134
  • 返回类型: void
  • 修饰符:public

参数:

  • collection: Collection
  • encoder: StreamEncoder<?super FriendlyByteBuf,T>

说明:

TODO

public <T> List<T> readList(StreamDecoder<?super FriendlyByteBuf,T> elementDecoder) @ L142

  • 方法名:readList
  • 源码定位:L142
  • 返回类型: List
  • 修饰符:public

参数:

  • elementDecoder: StreamDecoder<?super FriendlyByteBuf,T>

说明:

TODO

public IntList readIntIdList() @ L146

  • 方法名:readIntIdList
  • 源码定位:L146
  • 返回类型:IntList
  • 修饰符:public

参数:

说明:

TODO

public void writeIntIdList(IntList ids) @ L157

  • 方法名:writeIntIdList
  • 源码定位:L157
  • 返回类型:void
  • 修饰符:public

参数:

  • ids: IntList

说明:

TODO

public <K,V,M extends Map<K,V>> M readMap(IntFunction<M> ctor, StreamDecoder<?super FriendlyByteBuf,K> keyDecoder, StreamDecoder<?super FriendlyByteBuf,V> valueDecoder) @ L162

  • 方法名:readMap
  • 源码定位:L162
  • 返回类型:<K,V,M extends Map<K,V>> M
  • 修饰符:public

参数:

  • ctor: IntFunction
  • keyDecoder: StreamDecoder<?super FriendlyByteBuf,K>
  • valueDecoder: StreamDecoder<?super FriendlyByteBuf,V>

说明:

TODO

public <K,V> Map<K,V> readMap(StreamDecoder<?super FriendlyByteBuf,K> keyDecoder, StreamDecoder<?super FriendlyByteBuf,V> valueDecoder) @ L177

  • 方法名:readMap
  • 源码定位:L177
  • 返回类型:<K,V> Map<K,V>
  • 修饰符:public

参数:

  • keyDecoder: StreamDecoder<?super FriendlyByteBuf,K>
  • valueDecoder: StreamDecoder<?super FriendlyByteBuf,V>

说明:

TODO

public <K,V> void writeMap(Map<K,V> map, StreamEncoder<?super FriendlyByteBuf,K> keyEncoder, StreamEncoder<?super FriendlyByteBuf,V> valueEncoder) @ L181

  • 方法名:writeMap
  • 源码定位:L181
  • 返回类型:<K,V> void
  • 修饰符:public

参数:

  • map: Map<K,V>
  • keyEncoder: StreamEncoder<?super FriendlyByteBuf,K>
  • valueEncoder: StreamEncoder<?super FriendlyByteBuf,V>

说明:

TODO

public void readWithCount(Consumer<FriendlyByteBuf> reader) @ L189

  • 方法名:readWithCount
  • 源码定位:L189
  • 返回类型:void
  • 修饰符:public

参数:

  • reader: Consumer

说明:

TODO

public <E extends Enum<E>> void writeEnumSet(EnumSet<E> set, Class<E> clazz) @ L197

  • 方法名:writeEnumSet
  • 源码定位:L197
  • 返回类型:<E extends Enum> void
  • 修饰符:public

参数:

  • set: EnumSet
  • clazz: Class

说明:

TODO

public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> clazz) @ L208

  • 方法名:readEnumSet
  • 源码定位:L208
  • 返回类型:<E extends Enum> EnumSet
  • 修饰符:public

参数:

  • clazz: Class

说明:

TODO

public <T> void writeOptional(Optional<T> value, StreamEncoder<?super FriendlyByteBuf,T> valueWriter) @ L222

  • 方法名:writeOptional
  • 源码定位:L222
  • 返回类型: void
  • 修饰符:public

参数:

  • value: Optional
  • valueWriter: StreamEncoder<?super FriendlyByteBuf,T>

说明:

TODO

public <T> Optional<T> readOptional(StreamDecoder<?super FriendlyByteBuf,T> valueReader) @ L231

  • 方法名:readOptional
  • 源码定位:L231
  • 返回类型: Optional
  • 修饰符:public

参数:

  • valueReader: StreamDecoder<?super FriendlyByteBuf,T>

说明:

TODO

public <L,R> void writeEither(Either<L,R> value, StreamEncoder<?super FriendlyByteBuf,L> leftWriter, StreamEncoder<?super FriendlyByteBuf,R> rightWriter) @ L235

  • 方法名:writeEither
  • 源码定位:L235
  • 返回类型:<L,R> void
  • 修饰符:public

参数:

  • value: Either<L,R>
  • leftWriter: StreamEncoder<?super FriendlyByteBuf,L>
  • rightWriter: StreamEncoder<?super FriendlyByteBuf,R>

说明:

TODO

public <L,R> Either<L,R> readEither(StreamDecoder<?super FriendlyByteBuf,L> leftReader, StreamDecoder<?super FriendlyByteBuf,R> rightReader) @ L247

  • 方法名:readEither
  • 源码定位:L247
  • 返回类型:<L,R> Either<L,R>
  • 修饰符:public

参数:

  • leftReader: StreamDecoder<?super FriendlyByteBuf,L>
  • rightReader: StreamDecoder<?super FriendlyByteBuf,R>

说明:

TODO

public <T> T readNullable(StreamDecoder<?super FriendlyByteBuf,T> valueDecoder) @ L251

  • 方法名:readNullable
  • 源码定位:L251
  • 返回类型: T
  • 修饰符:public

参数:

  • valueDecoder: StreamDecoder<?super FriendlyByteBuf,T>

说明:

TODO

public static <T,B extends ByteBuf> T readNullable(B input, StreamDecoder<?super B,T> valueDecoder) @ L255

  • 方法名:readNullable
  • 源码定位:L255
  • 返回类型:<T,B extends ByteBuf> T
  • 修饰符:public static

参数:

  • input: B
  • valueDecoder: StreamDecoder<?super B,T>

说明:

TODO

public <T> void writeNullable(T value, StreamEncoder<?super FriendlyByteBuf,T> valueEncoder) @ L259

  • 方法名:writeNullable
  • 源码定位:L259
  • 返回类型: void
  • 修饰符:public

参数:

  • value: T
  • valueEncoder: StreamEncoder<?super FriendlyByteBuf,T>

说明:

TODO

public static <T,B extends ByteBuf> void writeNullable(B output, T value, StreamEncoder<?super B,T> valueEncoder) @ L263

  • 方法名:writeNullable
  • 源码定位:L263
  • 返回类型:<T,B extends ByteBuf> void
  • 修饰符:public static

参数:

  • output: B
  • value: T
  • valueEncoder: StreamEncoder<?super B,T>

说明:

TODO

public byte[] readByteArray() @ L272

  • 方法名:readByteArray
  • 源码定位:L272
  • 返回类型:byte[]
  • 修饰符:public

参数:

说明:

TODO

public static byte[] readByteArray(ByteBuf input) @ L276

  • 方法名:readByteArray
  • 源码定位:L276
  • 返回类型:byte[]
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public FriendlyByteBuf writeByteArray(byte[] bytes) @ L280

  • 方法名:writeByteArray
  • 源码定位:L280
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • bytes: byte[]

说明:

TODO

public static void writeByteArray(ByteBuf output, byte[] bytes) @ L285

  • 方法名:writeByteArray
  • 源码定位:L285
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • bytes: byte[]

说明:

TODO

public byte[] readByteArray(int maxSize) @ L290

  • 方法名:readByteArray
  • 源码定位:L290
  • 返回类型:byte[]
  • 修饰符:public

参数:

  • maxSize: int

说明:

TODO

public static byte[] readByteArray(ByteBuf input, int maxSize) @ L294

  • 方法名:readByteArray
  • 源码定位:L294
  • 返回类型:byte[]
  • 修饰符:public static

参数:

  • input: ByteBuf
  • maxSize: int

说明:

TODO

public FriendlyByteBuf writeVarIntArray(int[] ints) @ L305

  • 方法名:writeVarIntArray
  • 源码定位:L305
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • ints: int[]

说明:

TODO

public int[] readVarIntArray() @ L315

  • 方法名:readVarIntArray
  • 源码定位:L315
  • 返回类型:int[]
  • 修饰符:public

参数:

说明:

TODO

public int[] readVarIntArray(int maxSize) @ L319

  • 方法名:readVarIntArray
  • 源码定位:L319
  • 返回类型:int[]
  • 修饰符:public

参数:

  • maxSize: int

说明:

TODO

public FriendlyByteBuf writeLongArray(long[] longs) @ L334

  • 方法名:writeLongArray
  • 源码定位:L334
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • longs: long[]

说明:

TODO

public static void writeLongArray(ByteBuf output, long[] longs) @ L339

  • 方法名:writeLongArray
  • 源码定位:L339
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • longs: long[]

说明:

TODO

public FriendlyByteBuf writeFixedSizeLongArray(long[] longs) @ L344

  • 方法名:writeFixedSizeLongArray
  • 源码定位:L344
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • longs: long[]

说明:

TODO

public static void writeFixedSizeLongArray(ByteBuf output, long[] longs) @ L349

  • 方法名:writeFixedSizeLongArray
  • 源码定位:L349
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • longs: long[]

说明:

TODO

public long[] readLongArray() @ L355

  • 方法名:readLongArray
  • 源码定位:L355
  • 返回类型:long[]
  • 修饰符:public

参数:

说明:

TODO

public long[] readFixedSizeLongArray(long[] output) @ L359

  • 方法名:readFixedSizeLongArray
  • 源码定位:L359
  • 返回类型:long[]
  • 修饰符:public

参数:

  • output: long[]

说明:

TODO

public static long[] readLongArray(ByteBuf input) @ L363

  • 方法名:readLongArray
  • 源码定位:L363
  • 返回类型:long[]
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public static long[] readFixedSizeLongArray(ByteBuf input, long[] output) @ L373

  • 方法名:readFixedSizeLongArray
  • 源码定位:L373
  • 返回类型:long[]
  • 修饰符:public static

参数:

  • input: ByteBuf
  • output: long[]

说明:

TODO

public BlockPos readBlockPos() @ L381

  • 方法名:readBlockPos
  • 源码定位:L381
  • 返回类型:BlockPos
  • 修饰符:public

参数:

说明:

TODO

public static BlockPos readBlockPos(ByteBuf input) @ L385

  • 方法名:readBlockPos
  • 源码定位:L385
  • 返回类型:BlockPos
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public FriendlyByteBuf writeBlockPos(BlockPos pos) @ L389

  • 方法名:writeBlockPos
  • 源码定位:L389
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • pos: BlockPos

说明:

TODO

public static void writeBlockPos(ByteBuf output, BlockPos pos) @ L394

  • 方法名:writeBlockPos
  • 源码定位:L394
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • pos: BlockPos

说明:

TODO

public ChunkPos readChunkPos() @ L398

  • 方法名:readChunkPos
  • 源码定位:L398
  • 返回类型:ChunkPos
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf writeChunkPos(ChunkPos pos) @ L402

  • 方法名:writeChunkPos
  • 源码定位:L402
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • pos: ChunkPos

说明:

TODO

public static ChunkPos readChunkPos(ByteBuf input) @ L407

  • 方法名:readChunkPos
  • 源码定位:L407
  • 返回类型:ChunkPos
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public static void writeChunkPos(ByteBuf output, ChunkPos chunkPos) @ L411

  • 方法名:writeChunkPos
  • 源码定位:L411
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • chunkPos: ChunkPos

说明:

TODO

public GlobalPos readGlobalPos() @ L415

  • 方法名:readGlobalPos
  • 源码定位:L415
  • 返回类型:GlobalPos
  • 修饰符:public

参数:

说明:

TODO

public void writeGlobalPos(GlobalPos globalPos) @ L421

  • 方法名:writeGlobalPos
  • 源码定位:L421
  • 返回类型:void
  • 修饰符:public

参数:

  • globalPos: GlobalPos

说明:

TODO

public Vector3f readVector3f() @ L426

  • 方法名:readVector3f
  • 源码定位:L426
  • 返回类型:Vector3f
  • 修饰符:public

参数:

说明:

TODO

public static Vector3f readVector3f(ByteBuf input) @ L430

  • 方法名:readVector3f
  • 源码定位:L430
  • 返回类型:Vector3f
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public void writeVector3f(Vector3f v) @ L434

  • 方法名:writeVector3f
  • 源码定位:L434
  • 返回类型:void
  • 修饰符:public

参数:

  • v: Vector3f

说明:

TODO

public static void writeVector3f(ByteBuf output, Vector3fc v) @ L438

  • 方法名:writeVector3f
  • 源码定位:L438
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • v: Vector3fc

说明:

TODO

public Quaternionf readQuaternion() @ L444

  • 方法名:readQuaternion
  • 源码定位:L444
  • 返回类型:Quaternionf
  • 修饰符:public

参数:

说明:

TODO

public static Quaternionf readQuaternion(ByteBuf input) @ L448

  • 方法名:readQuaternion
  • 源码定位:L448
  • 返回类型:Quaternionf
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public void writeQuaternion(Quaternionf q) @ L452

  • 方法名:writeQuaternion
  • 源码定位:L452
  • 返回类型:void
  • 修饰符:public

参数:

  • q: Quaternionf

说明:

TODO

public static void writeQuaternion(ByteBuf output, Quaternionfc value) @ L456

  • 方法名:writeQuaternion
  • 源码定位:L456
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • value: Quaternionfc

说明:

TODO

public <T extends Enum<T>> T readEnum(Class<T> clazz) @ L463

  • 方法名:readEnum
  • 源码定位:L463
  • 返回类型:<T extends Enum> T
  • 修饰符:public

参数:

  • clazz: Class

说明:

TODO

public FriendlyByteBuf writeEnum(Enum<?> value) @ L467

  • 方法名:writeEnum
  • 源码定位:L467
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: Enum<?>

说明:

TODO

public <T> T readById(IntFunction<T> converter) @ L471

  • 方法名:readById
  • 源码定位:L471
  • 返回类型: T
  • 修饰符:public

参数:

  • converter: IntFunction

说明:

TODO

public <T> FriendlyByteBuf writeById(ToIntFunction<T> converter, T value) @ L476

  • 方法名:writeById
  • 源码定位:L476
  • 返回类型: FriendlyByteBuf
  • 修饰符:public

参数:

  • converter: ToIntFunction
  • value: T

说明:

TODO

public int readVarInt() @ L481

  • 方法名:readVarInt
  • 源码定位:L481
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public long readVarLong() @ L485

  • 方法名:readVarLong
  • 源码定位:L485
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf writeUUID(UUID uuid) @ L489

  • 方法名:writeUUID
  • 源码定位:L489
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • uuid: UUID

说明:

TODO

public static void writeUUID(ByteBuf output, UUID uuid) @ L494

  • 方法名:writeUUID
  • 源码定位:L494
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • uuid: UUID

说明:

TODO

public UUID readUUID() @ L499

  • 方法名:readUUID
  • 源码定位:L499
  • 返回类型:UUID
  • 修饰符:public

参数:

说明:

TODO

public static UUID readUUID(ByteBuf input) @ L503

  • 方法名:readUUID
  • 源码定位:L503
  • 返回类型:UUID
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public FriendlyByteBuf writeVarInt(int value) @ L507

  • 方法名:writeVarInt
  • 源码定位:L507
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeVarLong(long value) @ L512

  • 方法名:writeVarLong
  • 源码定位:L512
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: long

说明:

TODO

public FriendlyByteBuf writeNbt(Tag tag) @ L517

  • 方法名:writeNbt
  • 源码定位:L517
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • tag: Tag

说明:

TODO

public static void writeNbt(ByteBuf output, Tag tag) @ L522

  • 方法名:writeNbt
  • 源码定位:L522
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • tag: Tag

说明:

TODO

public CompoundTag readNbt() @ L534

  • 方法名:readNbt
  • 源码定位:L534
  • 返回类型:CompoundTag
  • 修饰符:public

参数:

说明:

TODO

public static CompoundTag readNbt(ByteBuf input) @ L538

  • 方法名:readNbt
  • 源码定位:L538
  • 返回类型:CompoundTag
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public static Tag readNbt(ByteBuf input, NbtAccounter accounter) @ L547

  • 方法名:readNbt
  • 源码定位:L547
  • 返回类型:Tag
  • 修饰符:public static

参数:

  • input: ByteBuf
  • accounter: NbtAccounter

说明:

TODO

public Tag readNbt(NbtAccounter accounter) @ L556

  • 方法名:readNbt
  • 源码定位:L556
  • 返回类型:Tag
  • 修饰符:public

参数:

  • accounter: NbtAccounter

说明:

TODO

public String readUtf() @ L560

  • 方法名:readUtf
  • 源码定位:L560
  • 返回类型:String
  • 修饰符:public

参数:

说明:

TODO

public String readUtf(int maxLength) @ L564

  • 方法名:readUtf
  • 源码定位:L564
  • 返回类型:String
  • 修饰符:public

参数:

  • maxLength: int

说明:

TODO

public FriendlyByteBuf writeUtf(String value) @ L568

  • 方法名:writeUtf
  • 源码定位:L568
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: String

说明:

TODO

public FriendlyByteBuf writeUtf(String value, int maxLength) @ L572

  • 方法名:writeUtf
  • 源码定位:L572
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: String
  • maxLength: int

说明:

TODO

public Identifier readIdentifier() @ L577

  • 方法名:readIdentifier
  • 源码定位:L577
  • 返回类型:Identifier
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf writeIdentifier(Identifier identifier) @ L581

  • 方法名:writeIdentifier
  • 源码定位:L581
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • identifier: Identifier

说明:

TODO

public <T> ResourceKey<T> readResourceKey(ResourceKey<?extends Registry<T>> registry) @ L586

  • 方法名:readResourceKey
  • 源码定位:L586
  • 返回类型: ResourceKey
  • 修饰符:public

参数:

  • registry: ResourceKey<?extends Registry>

说明:

TODO

public void writeResourceKey(ResourceKey<?> key) @ L591

  • 方法名:writeResourceKey
  • 源码定位:L591
  • 返回类型:void
  • 修饰符:public

参数:

  • key: ResourceKey<?>

说明:

TODO

public <T> ResourceKey<?extends Registry<T>> readRegistryKey() @ L595

  • 方法名:readRegistryKey
  • 源码定位:L595
  • 返回类型: ResourceKey<?extends Registry>
  • 修饰符:public

参数:

说明:

TODO

public Instant readInstant() @ L600

  • 方法名:readInstant
  • 源码定位:L600
  • 返回类型:Instant
  • 修饰符:public

参数:

说明:

TODO

public void writeInstant(Instant value) @ L604

  • 方法名:writeInstant
  • 源码定位:L604
  • 返回类型:void
  • 修饰符:public

参数:

  • value: Instant

说明:

TODO

public PublicKey readPublicKey() @ L608

  • 方法名:readPublicKey
  • 源码定位:L608
  • 返回类型:PublicKey
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf writePublicKey(PublicKey publicKey) @ L616

  • 方法名:writePublicKey
  • 源码定位:L616
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • publicKey: PublicKey

说明:

TODO

public BlockHitResult readBlockHitResult() @ L621

  • 方法名:readBlockHitResult
  • 源码定位:L621
  • 返回类型:BlockHitResult
  • 修饰符:public

参数:

说明:

TODO

public void writeBlockHitResult(BlockHitResult blockHit) @ L634

  • 方法名:writeBlockHitResult
  • 源码定位:L634
  • 返回类型:void
  • 修饰符:public

参数:

  • blockHit: BlockHitResult

说明:

TODO

public BitSet readBitSet() @ L646

  • 方法名:readBitSet
  • 源码定位:L646
  • 返回类型:BitSet
  • 修饰符:public

参数:

说明:

TODO

public void writeBitSet(BitSet bitSet) @ L650

  • 方法名:writeBitSet
  • 源码定位:L650
  • 返回类型:void
  • 修饰符:public

参数:

  • bitSet: BitSet

说明:

TODO

public BitSet readFixedBitSet(int size) @ L654

  • 方法名:readFixedBitSet
  • 源码定位:L654
  • 返回类型:BitSet
  • 修饰符:public

参数:

  • size: int

说明:

TODO

public void writeFixedBitSet(BitSet bitSet, int size) @ L660

  • 方法名:writeFixedBitSet
  • 源码定位:L660
  • 返回类型:void
  • 修饰符:public

参数:

  • bitSet: BitSet
  • size: int

说明:

TODO

public static int readContainerId(ByteBuf input) @ L669

  • 方法名:readContainerId
  • 源码定位:L669
  • 返回类型:int
  • 修饰符:public static

参数:

  • input: ByteBuf

说明:

TODO

public int readContainerId() @ L673

  • 方法名:readContainerId
  • 源码定位:L673
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public static void writeContainerId(ByteBuf output, int id) @ L677

  • 方法名:writeContainerId
  • 源码定位:L677
  • 返回类型:void
  • 修饰符:public static

参数:

  • output: ByteBuf
  • id: int

说明:

TODO

public void writeContainerId(int id) @ L681

  • 方法名:writeContainerId
  • 源码定位:L681
  • 返回类型:void
  • 修饰符:public

参数:

  • id: int

说明:

TODO

public boolean isContiguous() @ L685

  • 方法名:isContiguous
  • 源码定位:L685
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public int maxFastWritableBytes() @ L690

  • 方法名:maxFastWritableBytes
  • 源码定位:L690
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int capacity() @ L695

  • 方法名:capacity
  • 源码定位:L695
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf capacity(int newCapacity) @ L700

  • 方法名:capacity
  • 源码定位:L700
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • newCapacity: int

说明:

TODO

public int maxCapacity() @ L705

  • 方法名:maxCapacity
  • 源码定位:L705
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public ByteBufAllocator alloc() @ L710

  • 方法名:alloc
  • 源码定位:L710
  • 返回类型:ByteBufAllocator
  • 修饰符:public

参数:

说明:

TODO

public ByteOrder order() @ L715

  • 方法名:order
  • 源码定位:L715
  • 返回类型:ByteOrder
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf order(ByteOrder endianness) @ L720

  • 方法名:order
  • 源码定位:L720
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • endianness: ByteOrder

说明:

TODO

public ByteBuf unwrap() @ L725

  • 方法名:unwrap
  • 源码定位:L725
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public boolean isDirect() @ L730

  • 方法名:isDirect
  • 源码定位:L730
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean isReadOnly() @ L735

  • 方法名:isReadOnly
  • 源码定位:L735
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf asReadOnly() @ L740

  • 方法名:asReadOnly
  • 源码定位:L740
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public int readerIndex() @ L745

  • 方法名:readerIndex
  • 源码定位:L745
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf readerIndex(int readerIndex) @ L750

  • 方法名:readerIndex
  • 源码定位:L750
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • readerIndex: int

说明:

TODO

public int writerIndex() @ L755

  • 方法名:writerIndex
  • 源码定位:L755
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf writerIndex(int writerIndex) @ L760

  • 方法名:writerIndex
  • 源码定位:L760
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • writerIndex: int

说明:

TODO

public FriendlyByteBuf setIndex(int readerIndex, int writerIndex) @ L765

  • 方法名:setIndex
  • 源码定位:L765
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • readerIndex: int
  • writerIndex: int

说明:

TODO

public int readableBytes() @ L770

  • 方法名:readableBytes
  • 源码定位:L770
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int writableBytes() @ L775

  • 方法名:writableBytes
  • 源码定位:L775
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int maxWritableBytes() @ L780

  • 方法名:maxWritableBytes
  • 源码定位:L780
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public boolean isReadable() @ L785

  • 方法名:isReadable
  • 源码定位:L785
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean isReadable(int size) @ L790

  • 方法名:isReadable
  • 源码定位:L790
  • 返回类型:boolean
  • 修饰符:public

参数:

  • size: int

说明:

TODO

public boolean isWritable() @ L795

  • 方法名:isWritable
  • 源码定位:L795
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean isWritable(int size) @ L800

  • 方法名:isWritable
  • 源码定位:L800
  • 返回类型:boolean
  • 修饰符:public

参数:

  • size: int

说明:

TODO

public FriendlyByteBuf clear() @ L805

  • 方法名:clear
  • 源码定位:L805
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf markReaderIndex() @ L810

  • 方法名:markReaderIndex
  • 源码定位:L810
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf resetReaderIndex() @ L815

  • 方法名:resetReaderIndex
  • 源码定位:L815
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf markWriterIndex() @ L820

  • 方法名:markWriterIndex
  • 源码定位:L820
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf resetWriterIndex() @ L825

  • 方法名:resetWriterIndex
  • 源码定位:L825
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf discardReadBytes() @ L830

  • 方法名:discardReadBytes
  • 源码定位:L830
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf discardSomeReadBytes() @ L835

  • 方法名:discardSomeReadBytes
  • 源码定位:L835
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf ensureWritable(int minWritableBytes) @ L840

  • 方法名:ensureWritable
  • 源码定位:L840
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • minWritableBytes: int

说明:

TODO

public int ensureWritable(int minWritableBytes, boolean force) @ L845

  • 方法名:ensureWritable
  • 源码定位:L845
  • 返回类型:int
  • 修饰符:public

参数:

  • minWritableBytes: int
  • force: boolean

说明:

TODO

public boolean getBoolean(int index) @ L850

  • 方法名:getBoolean
  • 源码定位:L850
  • 返回类型:boolean
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public byte getByte(int index) @ L855

  • 方法名:getByte
  • 源码定位:L855
  • 返回类型:byte
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public short getUnsignedByte(int index) @ L860

  • 方法名:getUnsignedByte
  • 源码定位:L860
  • 返回类型:short
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public short getShort(int index) @ L865

  • 方法名:getShort
  • 源码定位:L865
  • 返回类型:short
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public short getShortLE(int index) @ L870

  • 方法名:getShortLE
  • 源码定位:L870
  • 返回类型:short
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getUnsignedShort(int index) @ L875

  • 方法名:getUnsignedShort
  • 源码定位:L875
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getUnsignedShortLE(int index) @ L880

  • 方法名:getUnsignedShortLE
  • 源码定位:L880
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getMedium(int index) @ L885

  • 方法名:getMedium
  • 源码定位:L885
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getMediumLE(int index) @ L890

  • 方法名:getMediumLE
  • 源码定位:L890
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getUnsignedMedium(int index) @ L895

  • 方法名:getUnsignedMedium
  • 源码定位:L895
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getUnsignedMediumLE(int index) @ L900

  • 方法名:getUnsignedMediumLE
  • 源码定位:L900
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getInt(int index) @ L905

  • 方法名:getInt
  • 源码定位:L905
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public int getIntLE(int index) @ L910

  • 方法名:getIntLE
  • 源码定位:L910
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public long getUnsignedInt(int index) @ L915

  • 方法名:getUnsignedInt
  • 源码定位:L915
  • 返回类型:long
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public long getUnsignedIntLE(int index) @ L920

  • 方法名:getUnsignedIntLE
  • 源码定位:L920
  • 返回类型:long
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public long getLong(int index) @ L925

  • 方法名:getLong
  • 源码定位:L925
  • 返回类型:long
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public long getLongLE(int index) @ L930

  • 方法名:getLongLE
  • 源码定位:L930
  • 返回类型:long
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public char getChar(int index) @ L935

  • 方法名:getChar
  • 源码定位:L935
  • 返回类型:char
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public float getFloat(int index) @ L940

  • 方法名:getFloat
  • 源码定位:L940
  • 返回类型:float
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public double getDouble(int index) @ L945

  • 方法名:getDouble
  • 源码定位:L945
  • 返回类型:double
  • 修饰符:public

参数:

  • index: int

说明:

TODO

public FriendlyByteBuf getBytes(int index, ByteBuf dst) @ L950

  • 方法名:getBytes
  • 源码定位:L950
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: ByteBuf

说明:

TODO

public FriendlyByteBuf getBytes(int index, ByteBuf dst, int length) @ L955

  • 方法名:getBytes
  • 源码定位:L955
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: ByteBuf
  • length: int

说明:

TODO

public FriendlyByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) @ L960

  • 方法名:getBytes
  • 源码定位:L960
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: ByteBuf
  • dstIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf getBytes(int index, byte[] dst) @ L965

  • 方法名:getBytes
  • 源码定位:L965
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: byte[]

说明:

TODO

public FriendlyByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) @ L970

  • 方法名:getBytes
  • 源码定位:L970
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: byte[]
  • dstIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf getBytes(int index, ByteBuffer dst) @ L975

  • 方法名:getBytes
  • 源码定位:L975
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • dst: ByteBuffer

说明:

TODO

public FriendlyByteBuf getBytes(int index, OutputStream out, int length) @ L980

  • 方法名:getBytes
  • 源码定位:L980
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • out: OutputStream
  • length: int

说明:

TODO

public int getBytes(int index, GatheringByteChannel out, int length) @ L985

  • 方法名:getBytes
  • 源码定位:L985
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • out: GatheringByteChannel
  • length: int

说明:

TODO

public int getBytes(int index, FileChannel out, long position, int length) @ L990

  • 方法名:getBytes
  • 源码定位:L990
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • out: FileChannel
  • position: long
  • length: int

说明:

TODO

public CharSequence getCharSequence(int index, int length, Charset charset) @ L995

  • 方法名:getCharSequence
  • 源码定位:L995
  • 返回类型:CharSequence
  • 修饰符:public

参数:

  • index: int
  • length: int
  • charset: Charset

说明:

TODO

public FriendlyByteBuf setBoolean(int index, boolean value) @ L1000

  • 方法名:setBoolean
  • 源码定位:L1000
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: boolean

说明:

TODO

public FriendlyByteBuf setByte(int index, int value) @ L1005

  • 方法名:setByte
  • 源码定位:L1005
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setShort(int index, int value) @ L1010

  • 方法名:setShort
  • 源码定位:L1010
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setShortLE(int index, int value) @ L1015

  • 方法名:setShortLE
  • 源码定位:L1015
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setMedium(int index, int value) @ L1020

  • 方法名:setMedium
  • 源码定位:L1020
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setMediumLE(int index, int value) @ L1025

  • 方法名:setMediumLE
  • 源码定位:L1025
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setInt(int index, int value) @ L1030

  • 方法名:setInt
  • 源码定位:L1030
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setIntLE(int index, int value) @ L1035

  • 方法名:setIntLE
  • 源码定位:L1035
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setLong(int index, long value) @ L1040

  • 方法名:setLong
  • 源码定位:L1040
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: long

说明:

TODO

public FriendlyByteBuf setLongLE(int index, long value) @ L1045

  • 方法名:setLongLE
  • 源码定位:L1045
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: long

说明:

TODO

public FriendlyByteBuf setChar(int index, int value) @ L1050

  • 方法名:setChar
  • 源码定位:L1050
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: int

说明:

TODO

public FriendlyByteBuf setFloat(int index, float value) @ L1055

  • 方法名:setFloat
  • 源码定位:L1055
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: float

说明:

TODO

public FriendlyByteBuf setDouble(int index, double value) @ L1060

  • 方法名:setDouble
  • 源码定位:L1060
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • value: double

说明:

TODO

public FriendlyByteBuf setBytes(int index, ByteBuf src) @ L1065

  • 方法名:setBytes
  • 源码定位:L1065
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: ByteBuf

说明:

TODO

public FriendlyByteBuf setBytes(int index, ByteBuf src, int length) @ L1070

  • 方法名:setBytes
  • 源码定位:L1070
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: ByteBuf
  • length: int

说明:

TODO

public FriendlyByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) @ L1075

  • 方法名:setBytes
  • 源码定位:L1075
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: ByteBuf
  • srcIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf setBytes(int index, byte[] src) @ L1080

  • 方法名:setBytes
  • 源码定位:L1080
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: byte[]

说明:

TODO

public FriendlyByteBuf setBytes(int index, byte[] src, int srcIndex, int length) @ L1085

  • 方法名:setBytes
  • 源码定位:L1085
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: byte[]
  • srcIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf setBytes(int index, ByteBuffer src) @ L1090

  • 方法名:setBytes
  • 源码定位:L1090
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • src: ByteBuffer

说明:

TODO

public int setBytes(int index, InputStream in, int length) @ L1095

  • 方法名:setBytes
  • 源码定位:L1095
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • in: InputStream
  • length: int

说明:

TODO

public int setBytes(int index, ScatteringByteChannel in, int length) @ L1100

  • 方法名:setBytes
  • 源码定位:L1100
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • in: ScatteringByteChannel
  • length: int

说明:

TODO

public int setBytes(int index, FileChannel in, long position, int length) @ L1105

  • 方法名:setBytes
  • 源码定位:L1105
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • in: FileChannel
  • position: long
  • length: int

说明:

TODO

public FriendlyByteBuf setZero(int index, int length) @ L1110

  • 方法名:setZero
  • 源码定位:L1110
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public int setCharSequence(int index, CharSequence sequence, Charset charset) @ L1115

  • 方法名:setCharSequence
  • 源码定位:L1115
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • sequence: CharSequence
  • charset: Charset

说明:

TODO

public boolean readBoolean() @ L1120

  • 方法名:readBoolean
  • 源码定位:L1120
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public byte readByte() @ L1125

  • 方法名:readByte
  • 源码定位:L1125
  • 返回类型:byte
  • 修饰符:public

参数:

说明:

TODO

public short readUnsignedByte() @ L1130

  • 方法名:readUnsignedByte
  • 源码定位:L1130
  • 返回类型:short
  • 修饰符:public

参数:

说明:

TODO

public short readShort() @ L1135

  • 方法名:readShort
  • 源码定位:L1135
  • 返回类型:short
  • 修饰符:public

参数:

说明:

TODO

public short readShortLE() @ L1140

  • 方法名:readShortLE
  • 源码定位:L1140
  • 返回类型:short
  • 修饰符:public

参数:

说明:

TODO

public int readUnsignedShort() @ L1145

  • 方法名:readUnsignedShort
  • 源码定位:L1145
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readUnsignedShortLE() @ L1150

  • 方法名:readUnsignedShortLE
  • 源码定位:L1150
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readMedium() @ L1155

  • 方法名:readMedium
  • 源码定位:L1155
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readMediumLE() @ L1160

  • 方法名:readMediumLE
  • 源码定位:L1160
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readUnsignedMedium() @ L1165

  • 方法名:readUnsignedMedium
  • 源码定位:L1165
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readUnsignedMediumLE() @ L1170

  • 方法名:readUnsignedMediumLE
  • 源码定位:L1170
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readInt() @ L1175

  • 方法名:readInt
  • 源码定位:L1175
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int readIntLE() @ L1180

  • 方法名:readIntLE
  • 源码定位:L1180
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public long readUnsignedInt() @ L1185

  • 方法名:readUnsignedInt
  • 源码定位:L1185
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public long readUnsignedIntLE() @ L1190

  • 方法名:readUnsignedIntLE
  • 源码定位:L1190
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public long readLong() @ L1195

  • 方法名:readLong
  • 源码定位:L1195
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public long readLongLE() @ L1200

  • 方法名:readLongLE
  • 源码定位:L1200
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public char readChar() @ L1205

  • 方法名:readChar
  • 源码定位:L1205
  • 返回类型:char
  • 修饰符:public

参数:

说明:

TODO

public float readFloat() @ L1210

  • 方法名:readFloat
  • 源码定位:L1210
  • 返回类型:float
  • 修饰符:public

参数:

说明:

TODO

public double readDouble() @ L1215

  • 方法名:readDouble
  • 源码定位:L1215
  • 返回类型:double
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf readBytes(int length) @ L1220

  • 方法名:readBytes
  • 源码定位:L1220
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • length: int

说明:

TODO

public ByteBuf readSlice(int length) @ L1225

  • 方法名:readSlice
  • 源码定位:L1225
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • length: int

说明:

TODO

public ByteBuf readRetainedSlice(int length) @ L1230

  • 方法名:readRetainedSlice
  • 源码定位:L1230
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • length: int

说明:

TODO

public FriendlyByteBuf readBytes(ByteBuf dst) @ L1235

  • 方法名:readBytes
  • 源码定位:L1235
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: ByteBuf

说明:

TODO

public FriendlyByteBuf readBytes(ByteBuf dst, int length) @ L1240

  • 方法名:readBytes
  • 源码定位:L1240
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: ByteBuf
  • length: int

说明:

TODO

public FriendlyByteBuf readBytes(ByteBuf dst, int dstIndex, int length) @ L1245

  • 方法名:readBytes
  • 源码定位:L1245
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: ByteBuf
  • dstIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf readBytes(byte[] dst) @ L1250

  • 方法名:readBytes
  • 源码定位:L1250
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: byte[]

说明:

TODO

public FriendlyByteBuf readBytes(byte[] dst, int dstIndex, int length) @ L1255

  • 方法名:readBytes
  • 源码定位:L1255
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: byte[]
  • dstIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf readBytes(ByteBuffer dst) @ L1260

  • 方法名:readBytes
  • 源码定位:L1260
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • dst: ByteBuffer

说明:

TODO

public FriendlyByteBuf readBytes(OutputStream out, int length) @ L1265

  • 方法名:readBytes
  • 源码定位:L1265
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • out: OutputStream
  • length: int

说明:

TODO

public int readBytes(GatheringByteChannel out, int length) @ L1270

  • 方法名:readBytes
  • 源码定位:L1270
  • 返回类型:int
  • 修饰符:public

参数:

  • out: GatheringByteChannel
  • length: int

说明:

TODO

public CharSequence readCharSequence(int length, Charset charset) @ L1275

  • 方法名:readCharSequence
  • 源码定位:L1275
  • 返回类型:CharSequence
  • 修饰符:public

参数:

  • length: int
  • charset: Charset

说明:

TODO

public String readString(int length, Charset charset) @ L1280

  • 方法名:readString
  • 源码定位:L1280
  • 返回类型:String
  • 修饰符:public

参数:

  • length: int
  • charset: Charset

说明:

TODO

public int readBytes(FileChannel out, long position, int length) @ L1285

  • 方法名:readBytes
  • 源码定位:L1285
  • 返回类型:int
  • 修饰符:public

参数:

  • out: FileChannel
  • position: long
  • length: int

说明:

TODO

public FriendlyByteBuf skipBytes(int length) @ L1290

  • 方法名:skipBytes
  • 源码定位:L1290
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • length: int

说明:

TODO

public FriendlyByteBuf writeBoolean(boolean value) @ L1295

  • 方法名:writeBoolean
  • 源码定位:L1295
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: boolean

说明:

TODO

public FriendlyByteBuf writeByte(int value) @ L1300

  • 方法名:writeByte
  • 源码定位:L1300
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeShort(int value) @ L1305

  • 方法名:writeShort
  • 源码定位:L1305
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeShortLE(int value) @ L1310

  • 方法名:writeShortLE
  • 源码定位:L1310
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeMedium(int value) @ L1315

  • 方法名:writeMedium
  • 源码定位:L1315
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeMediumLE(int value) @ L1320

  • 方法名:writeMediumLE
  • 源码定位:L1320
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeInt(int value) @ L1325

  • 方法名:writeInt
  • 源码定位:L1325
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeIntLE(int value) @ L1330

  • 方法名:writeIntLE
  • 源码定位:L1330
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeLong(long value) @ L1335

  • 方法名:writeLong
  • 源码定位:L1335
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: long

说明:

TODO

public FriendlyByteBuf writeLongLE(long value) @ L1340

  • 方法名:writeLongLE
  • 源码定位:L1340
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: long

说明:

TODO

public FriendlyByteBuf writeChar(int value) @ L1345

  • 方法名:writeChar
  • 源码定位:L1345
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: int

说明:

TODO

public FriendlyByteBuf writeFloat(float value) @ L1350

  • 方法名:writeFloat
  • 源码定位:L1350
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: float

说明:

TODO

public FriendlyByteBuf writeDouble(double value) @ L1355

  • 方法名:writeDouble
  • 源码定位:L1355
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • value: double

说明:

TODO

public FriendlyByteBuf writeBytes(ByteBuf src) @ L1360

  • 方法名:writeBytes
  • 源码定位:L1360
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: ByteBuf

说明:

TODO

public FriendlyByteBuf writeBytes(ByteBuf src, int length) @ L1365

  • 方法名:writeBytes
  • 源码定位:L1365
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: ByteBuf
  • length: int

说明:

TODO

public FriendlyByteBuf writeBytes(ByteBuf src, int srcIndex, int length) @ L1370

  • 方法名:writeBytes
  • 源码定位:L1370
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: ByteBuf
  • srcIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf writeBytes(byte[] src) @ L1375

  • 方法名:writeBytes
  • 源码定位:L1375
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: byte[]

说明:

TODO

public FriendlyByteBuf writeBytes(byte[] src, int srcIndex, int length) @ L1380

  • 方法名:writeBytes
  • 源码定位:L1380
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: byte[]
  • srcIndex: int
  • length: int

说明:

TODO

public FriendlyByteBuf writeBytes(ByteBuffer src) @ L1385

  • 方法名:writeBytes
  • 源码定位:L1385
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • src: ByteBuffer

说明:

TODO

public int writeBytes(InputStream in, int length) @ L1390

  • 方法名:writeBytes
  • 源码定位:L1390
  • 返回类型:int
  • 修饰符:public

参数:

  • in: InputStream
  • length: int

说明:

TODO

public int writeBytes(ScatteringByteChannel in, int length) @ L1395

  • 方法名:writeBytes
  • 源码定位:L1395
  • 返回类型:int
  • 修饰符:public

参数:

  • in: ScatteringByteChannel
  • length: int

说明:

TODO

public int writeBytes(FileChannel in, long position, int length) @ L1400

  • 方法名:writeBytes
  • 源码定位:L1400
  • 返回类型:int
  • 修饰符:public

参数:

  • in: FileChannel
  • position: long
  • length: int

说明:

TODO

public FriendlyByteBuf writeZero(int length) @ L1405

  • 方法名:writeZero
  • 源码定位:L1405
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • length: int

说明:

TODO

public int writeCharSequence(CharSequence sequence, Charset charset) @ L1410

  • 方法名:writeCharSequence
  • 源码定位:L1410
  • 返回类型:int
  • 修饰符:public

参数:

  • sequence: CharSequence
  • charset: Charset

说明:

TODO

public int indexOf(int fromIndex, int toIndex, byte value) @ L1415

  • 方法名:indexOf
  • 源码定位:L1415
  • 返回类型:int
  • 修饰符:public

参数:

  • fromIndex: int
  • toIndex: int
  • value: byte

说明:

TODO

public int bytesBefore(byte value) @ L1420

  • 方法名:bytesBefore
  • 源码定位:L1420
  • 返回类型:int
  • 修饰符:public

参数:

  • value: byte

说明:

TODO

public int bytesBefore(int length, byte value) @ L1425

  • 方法名:bytesBefore
  • 源码定位:L1425
  • 返回类型:int
  • 修饰符:public

参数:

  • length: int
  • value: byte

说明:

TODO

public int bytesBefore(int index, int length, byte value) @ L1430

  • 方法名:bytesBefore
  • 源码定位:L1430
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • length: int
  • value: byte

说明:

TODO

public int forEachByte(ByteProcessor processor) @ L1435

  • 方法名:forEachByte
  • 源码定位:L1435
  • 返回类型:int
  • 修饰符:public

参数:

  • processor: ByteProcessor

说明:

TODO

public int forEachByte(int index, int length, ByteProcessor processor) @ L1440

  • 方法名:forEachByte
  • 源码定位:L1440
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • length: int
  • processor: ByteProcessor

说明:

TODO

public int forEachByteDesc(ByteProcessor processor) @ L1445

  • 方法名:forEachByteDesc
  • 源码定位:L1445
  • 返回类型:int
  • 修饰符:public

参数:

  • processor: ByteProcessor

说明:

TODO

public int forEachByteDesc(int index, int length, ByteProcessor processor) @ L1450

  • 方法名:forEachByteDesc
  • 源码定位:L1450
  • 返回类型:int
  • 修饰符:public

参数:

  • index: int
  • length: int
  • processor: ByteProcessor

说明:

TODO

public ByteBuf copy() @ L1455

  • 方法名:copy
  • 源码定位:L1455
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf copy(int index, int length) @ L1460

  • 方法名:copy
  • 源码定位:L1460
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public ByteBuf slice() @ L1465

  • 方法名:slice
  • 源码定位:L1465
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf retainedSlice() @ L1470

  • 方法名:retainedSlice
  • 源码定位:L1470
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf slice(int index, int length) @ L1475

  • 方法名:slice
  • 源码定位:L1475
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public ByteBuf retainedSlice(int index, int length) @ L1480

  • 方法名:retainedSlice
  • 源码定位:L1480
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public ByteBuf duplicate() @ L1485

  • 方法名:duplicate
  • 源码定位:L1485
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public ByteBuf retainedDuplicate() @ L1490

  • 方法名:retainedDuplicate
  • 源码定位:L1490
  • 返回类型:ByteBuf
  • 修饰符:public

参数:

说明:

TODO

public int nioBufferCount() @ L1495

  • 方法名:nioBufferCount
  • 源码定位:L1495
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public ByteBuffer nioBuffer() @ L1500

  • 方法名:nioBuffer
  • 源码定位:L1500
  • 返回类型:ByteBuffer
  • 修饰符:public

参数:

说明:

TODO

public ByteBuffer nioBuffer(int index, int length) @ L1505

  • 方法名:nioBuffer
  • 源码定位:L1505
  • 返回类型:ByteBuffer
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public ByteBuffer internalNioBuffer(int index, int length) @ L1510

  • 方法名:internalNioBuffer
  • 源码定位:L1510
  • 返回类型:ByteBuffer
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public ByteBuffer[] nioBuffers() @ L1515

  • 方法名:nioBuffers
  • 源码定位:L1515
  • 返回类型:ByteBuffer[]
  • 修饰符:public

参数:

说明:

TODO

public ByteBuffer[] nioBuffers(int index, int length) @ L1520

  • 方法名:nioBuffers
  • 源码定位:L1520
  • 返回类型:ByteBuffer[]
  • 修饰符:public

参数:

  • index: int
  • length: int

说明:

TODO

public boolean hasArray() @ L1525

  • 方法名:hasArray
  • 源码定位:L1525
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public byte[] array() @ L1530

  • 方法名:array
  • 源码定位:L1530
  • 返回类型:byte[]
  • 修饰符:public

参数:

说明:

TODO

public int arrayOffset() @ L1535

  • 方法名:arrayOffset
  • 源码定位:L1535
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public boolean hasMemoryAddress() @ L1540

  • 方法名:hasMemoryAddress
  • 源码定位:L1540
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public long memoryAddress() @ L1545

  • 方法名:memoryAddress
  • 源码定位:L1545
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public String toString(Charset charset) @ L1550

  • 方法名:toString
  • 源码定位:L1550
  • 返回类型:String
  • 修饰符:public

参数:

  • charset: Charset

说明:

TODO

public String toString(int index, int length, Charset charset) @ L1555

  • 方法名:toString
  • 源码定位:L1555
  • 返回类型:String
  • 修饰符:public

参数:

  • index: int
  • length: int
  • charset: Charset

说明:

TODO

public int hashCode() @ L1560

  • 方法名:hashCode
  • 源码定位:L1560
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public boolean equals(Object obj) @ L1565

  • 方法名:equals
  • 源码定位:L1565
  • 返回类型:boolean
  • 修饰符:public

参数:

  • obj: Object

说明:

TODO

public int compareTo(ByteBuf buffer) @ L1570

  • 方法名:compareTo
  • 源码定位:L1570
  • 返回类型:int
  • 修饰符:public

参数:

  • buffer: ByteBuf

说明:

TODO

public String toString() @ L1575

  • 方法名:toString
  • 源码定位:L1575
  • 返回类型:String
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf retain(int increment) @ L1580

  • 方法名:retain
  • 源码定位:L1580
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • increment: int

说明:

TODO

public FriendlyByteBuf retain() @ L1585

  • 方法名:retain
  • 源码定位:L1585
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf touch() @ L1590

  • 方法名:touch
  • 源码定位:L1590
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

说明:

TODO

public FriendlyByteBuf touch(Object hint) @ L1595

  • 方法名:touch
  • 源码定位:L1595
  • 返回类型:FriendlyByteBuf
  • 修饰符:public

参数:

  • hint: Object

说明:

TODO

public int refCnt() @ L1600

  • 方法名:refCnt
  • 源码定位:L1600
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public boolean release() @ L1605

  • 方法名:release
  • 源码定位:L1605
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean release(int decrement) @ L1610

  • 方法名:release
  • 源码定位:L1610
  • 返回类型:boolean
  • 修饰符:public

参数:

  • decrement: int

说明:

TODO

代码

public class FriendlyByteBuf extends ByteBuf {
    private final ByteBuf source;
    public static final short MAX_STRING_LENGTH = 32767;
    public static final int MAX_COMPONENT_STRING_LENGTH = 262144;
    private static final int PUBLIC_KEY_SIZE = 256;
    private static final int MAX_PUBLIC_KEY_HEADER_SIZE = 256;
    private static final int MAX_PUBLIC_KEY_LENGTH = 512;
    private static final Gson GSON = new Gson();
 
    public FriendlyByteBuf(ByteBuf source) {
        this.source = source;
    }
 
    @Deprecated
    public <T> T readWithCodecTrusted(DynamicOps<Tag> ops, Codec<T> codec) {
        return this.readWithCodec(ops, codec, NbtAccounter.unlimitedHeap());
    }
 
    @Deprecated
    public <T> T readWithCodec(DynamicOps<Tag> ops, Codec<T> codec, NbtAccounter accounter) {
        Tag tag = this.readNbt(accounter);
        return codec.parse(ops, tag).getOrThrow(msg -> new DecoderException("Failed to decode: " + msg + " " + tag));
    }
 
    @Deprecated
    public <T> FriendlyByteBuf writeWithCodec(DynamicOps<Tag> ops, Codec<T> codec, T value) {
        Tag tag = codec.encodeStart(ops, value).getOrThrow(msg -> new EncoderException("Failed to encode: " + msg + " " + value));
        this.writeNbt(tag);
        return this;
    }
 
    public <T> T readLenientJsonWithCodec(Codec<T> codec) {
        JsonElement json = LenientJsonParser.parse(this.readUtf());
        DataResult<T> result = codec.parse(JsonOps.INSTANCE, json);
        return result.getOrThrow(error -> new DecoderException("Failed to decode JSON: " + error));
    }
 
    public <T> void writeJsonWithCodec(Codec<T> codec, T value) {
        DataResult<JsonElement> result = codec.encodeStart(JsonOps.INSTANCE, value);
        this.writeUtf(GSON.toJson(result.getOrThrow(error -> new EncoderException("Failed to encode: " + error + " " + value))));
    }
 
    public static <T> IntFunction<T> limitValue(IntFunction<T> original, int limit) {
        return value -> {
            if (value > limit) {
                throw new DecoderException("Value " + value + " is larger than limit " + limit);
            } else {
                return original.apply(value);
            }
        };
    }
 
    public <T, C extends Collection<T>> C readCollection(IntFunction<C> ctor, StreamDecoder<? super FriendlyByteBuf, T> elementDecoder) {
        int count = this.readVarInt();
        C result = (C)ctor.apply(count);
 
        for (int i = 0; i < count; i++) {
            result.add(elementDecoder.decode(this));
        }
 
        return result;
    }
 
    public <T> void writeCollection(Collection<T> collection, StreamEncoder<? super FriendlyByteBuf, T> encoder) {
        this.writeVarInt(collection.size());
 
        for (T element : collection) {
            encoder.encode(this, element);
        }
    }
 
    public <T> List<T> readList(StreamDecoder<? super FriendlyByteBuf, T> elementDecoder) {
        return this.readCollection(Lists::newArrayListWithCapacity, elementDecoder);
    }
 
    public IntList readIntIdList() {
        int count = this.readVarInt();
        IntList result = new IntArrayList();
 
        for (int i = 0; i < count; i++) {
            result.add(this.readVarInt());
        }
 
        return result;
    }
 
    public void writeIntIdList(IntList ids) {
        this.writeVarInt(ids.size());
        ids.forEach(this::writeVarInt);
    }
 
    public <K, V, M extends Map<K, V>> M readMap(
        IntFunction<M> ctor, StreamDecoder<? super FriendlyByteBuf, K> keyDecoder, StreamDecoder<? super FriendlyByteBuf, V> valueDecoder
    ) {
        int count = this.readVarInt();
        M result = (M)ctor.apply(count);
 
        for (int i = 0; i < count; i++) {
            K key = keyDecoder.decode(this);
            V value = valueDecoder.decode(this);
            result.put(key, value);
        }
 
        return result;
    }
 
    public <K, V> Map<K, V> readMap(StreamDecoder<? super FriendlyByteBuf, K> keyDecoder, StreamDecoder<? super FriendlyByteBuf, V> valueDecoder) {
        return this.readMap(Maps::newHashMapWithExpectedSize, keyDecoder, valueDecoder);
    }
 
    public <K, V> void writeMap(Map<K, V> map, StreamEncoder<? super FriendlyByteBuf, K> keyEncoder, StreamEncoder<? super FriendlyByteBuf, V> valueEncoder) {
        this.writeVarInt(map.size());
        map.forEach((k, v) -> {
            keyEncoder.encode(this, (K)k);
            valueEncoder.encode(this, (V)v);
        });
    }
 
    public void readWithCount(Consumer<FriendlyByteBuf> reader) {
        int count = this.readVarInt();
 
        for (int i = 0; i < count; i++) {
            reader.accept(this);
        }
    }
 
    public <E extends Enum<E>> void writeEnumSet(EnumSet<E> set, Class<E> clazz) {
        E[] values = (E[])clazz.getEnumConstants();
        BitSet mask = new BitSet(values.length);
 
        for (int i = 0; i < values.length; i++) {
            mask.set(i, set.contains(values[i]));
        }
 
        this.writeFixedBitSet(mask, values.length);
    }
 
    public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> clazz) {
        E[] values = (E[])clazz.getEnumConstants();
        BitSet mask = this.readFixedBitSet(values.length);
        EnumSet<E> result = EnumSet.noneOf(clazz);
 
        for (int i = 0; i < values.length; i++) {
            if (mask.get(i)) {
                result.add(values[i]);
            }
        }
 
        return result;
    }
 
    public <T> void writeOptional(Optional<T> value, StreamEncoder<? super FriendlyByteBuf, T> valueWriter) {
        if (value.isPresent()) {
            this.writeBoolean(true);
            valueWriter.encode(this, value.get());
        } else {
            this.writeBoolean(false);
        }
    }
 
    public <T> Optional<T> readOptional(StreamDecoder<? super FriendlyByteBuf, T> valueReader) {
        return this.readBoolean() ? Optional.of(valueReader.decode(this)) : Optional.empty();
    }
 
    public <L, R> void writeEither(
        Either<L, R> value, StreamEncoder<? super FriendlyByteBuf, L> leftWriter, StreamEncoder<? super FriendlyByteBuf, R> rightWriter
    ) {
        value.ifLeft(left -> {
            this.writeBoolean(true);
            leftWriter.encode(this, (L)left);
        }).ifRight(right -> {
            this.writeBoolean(false);
            rightWriter.encode(this, (R)right);
        });
    }
 
    public <L, R> Either<L, R> readEither(StreamDecoder<? super FriendlyByteBuf, L> leftReader, StreamDecoder<? super FriendlyByteBuf, R> rightReader) {
        return this.readBoolean() ? Either.left(leftReader.decode(this)) : Either.right(rightReader.decode(this));
    }
 
    public <T> @Nullable T readNullable(StreamDecoder<? super FriendlyByteBuf, T> valueDecoder) {
        return readNullable(this, valueDecoder);
    }
 
    public static <T, B extends ByteBuf> @Nullable T readNullable(B input, StreamDecoder<? super B, T> valueDecoder) {
        return input.readBoolean() ? valueDecoder.decode(input) : null;
    }
 
    public <T> void writeNullable(@Nullable T value, StreamEncoder<? super FriendlyByteBuf, T> valueEncoder) {
        writeNullable(this, value, valueEncoder);
    }
 
    public static <T, B extends ByteBuf> void writeNullable(B output, @Nullable T value, StreamEncoder<? super B, T> valueEncoder) {
        if (value != null) {
            output.writeBoolean(true);
            valueEncoder.encode(output, value);
        } else {
            output.writeBoolean(false);
        }
    }
 
    public byte[] readByteArray() {
        return readByteArray(this);
    }
 
    public static byte[] readByteArray(ByteBuf input) {
        return readByteArray(input, input.readableBytes());
    }
 
    public FriendlyByteBuf writeByteArray(byte[] bytes) {
        writeByteArray(this, bytes);
        return this;
    }
 
    public static void writeByteArray(ByteBuf output, byte[] bytes) {
        VarInt.write(output, bytes.length);
        output.writeBytes(bytes);
    }
 
    public byte[] readByteArray(int maxSize) {
        return readByteArray(this, maxSize);
    }
 
    public static byte[] readByteArray(ByteBuf input, int maxSize) {
        int size = VarInt.read(input);
        if (size > maxSize) {
            throw new DecoderException("ByteArray with size " + size + " is bigger than allowed " + maxSize);
        } else {
            byte[] bytes = new byte[size];
            input.readBytes(bytes);
            return bytes;
        }
    }
 
    public FriendlyByteBuf writeVarIntArray(int[] ints) {
        this.writeVarInt(ints.length);
 
        for (int i : ints) {
            this.writeVarInt(i);
        }
 
        return this;
    }
 
    public int[] readVarIntArray() {
        return this.readVarIntArray(this.readableBytes());
    }
 
    public int[] readVarIntArray(int maxSize) {
        int size = this.readVarInt();
        if (size > maxSize) {
            throw new DecoderException("VarIntArray with size " + size + " is bigger than allowed " + maxSize);
        } else {
            int[] ints = new int[size];
 
            for (int i = 0; i < ints.length; i++) {
                ints[i] = this.readVarInt();
            }
 
            return ints;
        }
    }
 
    public FriendlyByteBuf writeLongArray(long[] longs) {
        writeLongArray(this, longs);
        return this;
    }
 
    public static void writeLongArray(ByteBuf output, long[] longs) {
        VarInt.write(output, longs.length);
        writeFixedSizeLongArray(output, longs);
    }
 
    public FriendlyByteBuf writeFixedSizeLongArray(long[] longs) {
        writeFixedSizeLongArray(this, longs);
        return this;
    }
 
    public static void writeFixedSizeLongArray(ByteBuf output, long[] longs) {
        for (long l : longs) {
            output.writeLong(l);
        }
    }
 
    public long[] readLongArray() {
        return readLongArray(this);
    }
 
    public long[] readFixedSizeLongArray(long[] output) {
        return readFixedSizeLongArray(this, output);
    }
 
    public static long[] readLongArray(ByteBuf input) {
        int size = VarInt.read(input);
        int maxSize = input.readableBytes() / 8;
        if (size > maxSize) {
            throw new DecoderException("LongArray with size " + size + " is bigger than allowed " + maxSize);
        } else {
            return readFixedSizeLongArray(input, new long[size]);
        }
    }
 
    public static long[] readFixedSizeLongArray(ByteBuf input, long[] output) {
        for (int i = 0; i < output.length; i++) {
            output[i] = input.readLong();
        }
 
        return output;
    }
 
    public BlockPos readBlockPos() {
        return readBlockPos(this);
    }
 
    public static BlockPos readBlockPos(ByteBuf input) {
        return BlockPos.of(input.readLong());
    }
 
    public FriendlyByteBuf writeBlockPos(BlockPos pos) {
        writeBlockPos(this, pos);
        return this;
    }
 
    public static void writeBlockPos(ByteBuf output, BlockPos pos) {
        output.writeLong(pos.asLong());
    }
 
    public ChunkPos readChunkPos() {
        return ChunkPos.unpack(this.readLong());
    }
 
    public FriendlyByteBuf writeChunkPos(ChunkPos pos) {
        this.writeLong(pos.pack());
        return this;
    }
 
    public static ChunkPos readChunkPos(ByteBuf input) {
        return ChunkPos.unpack(input.readLong());
    }
 
    public static void writeChunkPos(ByteBuf output, ChunkPos chunkPos) {
        output.writeLong(chunkPos.pack());
    }
 
    public GlobalPos readGlobalPos() {
        ResourceKey<Level> dimension = this.readResourceKey(Registries.DIMENSION);
        BlockPos pos = this.readBlockPos();
        return GlobalPos.of(dimension, pos);
    }
 
    public void writeGlobalPos(GlobalPos globalPos) {
        this.writeResourceKey(globalPos.dimension());
        this.writeBlockPos(globalPos.pos());
    }
 
    public Vector3f readVector3f() {
        return readVector3f(this);
    }
 
    public static Vector3f readVector3f(ByteBuf input) {
        return new Vector3f(input.readFloat(), input.readFloat(), input.readFloat());
    }
 
    public void writeVector3f(Vector3f v) {
        writeVector3f(this, v);
    }
 
    public static void writeVector3f(ByteBuf output, Vector3fc v) {
        output.writeFloat(v.x());
        output.writeFloat(v.y());
        output.writeFloat(v.z());
    }
 
    public Quaternionf readQuaternion() {
        return readQuaternion(this);
    }
 
    public static Quaternionf readQuaternion(ByteBuf input) {
        return new Quaternionf(input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());
    }
 
    public void writeQuaternion(Quaternionf q) {
        writeQuaternion(this, q);
    }
 
    public static void writeQuaternion(ByteBuf output, Quaternionfc value) {
        output.writeFloat(value.x());
        output.writeFloat(value.y());
        output.writeFloat(value.z());
        output.writeFloat(value.w());
    }
 
    public <T extends Enum<T>> T readEnum(Class<T> clazz) {
        return clazz.getEnumConstants()[this.readVarInt()];
    }
 
    public FriendlyByteBuf writeEnum(Enum<?> value) {
        return this.writeVarInt(value.ordinal());
    }
 
    public <T> T readById(IntFunction<T> converter) {
        int id = this.readVarInt();
        return converter.apply(id);
    }
 
    public <T> FriendlyByteBuf writeById(ToIntFunction<T> converter, T value) {
        int id = converter.applyAsInt(value);
        return this.writeVarInt(id);
    }
 
    public int readVarInt() {
        return VarInt.read(this.source);
    }
 
    public long readVarLong() {
        return VarLong.read(this.source);
    }
 
    public FriendlyByteBuf writeUUID(UUID uuid) {
        writeUUID(this, uuid);
        return this;
    }
 
    public static void writeUUID(ByteBuf output, UUID uuid) {
        output.writeLong(uuid.getMostSignificantBits());
        output.writeLong(uuid.getLeastSignificantBits());
    }
 
    public UUID readUUID() {
        return readUUID(this);
    }
 
    public static UUID readUUID(ByteBuf input) {
        return new UUID(input.readLong(), input.readLong());
    }
 
    public FriendlyByteBuf writeVarInt(int value) {
        VarInt.write(this.source, value);
        return this;
    }
 
    public FriendlyByteBuf writeVarLong(long value) {
        VarLong.write(this.source, value);
        return this;
    }
 
    public FriendlyByteBuf writeNbt(@Nullable Tag tag) {
        writeNbt(this, tag);
        return this;
    }
 
    public static void writeNbt(ByteBuf output, @Nullable Tag tag) {
        if (tag == null) {
            tag = EndTag.INSTANCE;
        }
 
        try {
            NbtIo.writeAnyTag(tag, new ByteBufOutputStream(output));
        } catch (IOException var3) {
            throw new EncoderException(var3);
        }
    }
 
    public @Nullable CompoundTag readNbt() {
        return readNbt(this);
    }
 
    public static @Nullable CompoundTag readNbt(ByteBuf input) {
        Tag result = readNbt(input, NbtAccounter.defaultQuota());
        if (result != null && !(result instanceof CompoundTag)) {
            throw new DecoderException("Not a compound tag: " + result);
        } else {
            return (CompoundTag)result;
        }
    }
 
    public static @Nullable Tag readNbt(ByteBuf input, NbtAccounter accounter) {
        try {
            Tag tag = NbtIo.readAnyTag(new ByteBufInputStream(input), accounter);
            return tag.getId() == 0 ? null : tag;
        } catch (IOException var3) {
            throw new EncoderException(var3);
        }
    }
 
    public @Nullable Tag readNbt(NbtAccounter accounter) {
        return readNbt(this, accounter);
    }
 
    public String readUtf() {
        return this.readUtf(32767);
    }
 
    public String readUtf(int maxLength) {
        return Utf8String.read(this.source, maxLength);
    }
 
    public FriendlyByteBuf writeUtf(String value) {
        return this.writeUtf(value, 32767);
    }
 
    public FriendlyByteBuf writeUtf(String value, int maxLength) {
        Utf8String.write(this.source, value, maxLength);
        return this;
    }
 
    public Identifier readIdentifier() {
        return Identifier.parse(this.readUtf(32767));
    }
 
    public FriendlyByteBuf writeIdentifier(Identifier identifier) {
        this.writeUtf(identifier.toString());
        return this;
    }
 
    public <T> ResourceKey<T> readResourceKey(ResourceKey<? extends Registry<T>> registry) {
        Identifier id = this.readIdentifier();
        return ResourceKey.create(registry, id);
    }
 
    public void writeResourceKey(ResourceKey<?> key) {
        this.writeIdentifier(key.identifier());
    }
 
    public <T> ResourceKey<? extends Registry<T>> readRegistryKey() {
        Identifier id = this.readIdentifier();
        return ResourceKey.createRegistryKey(id);
    }
 
    public Instant readInstant() {
        return Instant.ofEpochMilli(this.readLong());
    }
 
    public void writeInstant(Instant value) {
        this.writeLong(value.toEpochMilli());
    }
 
    public PublicKey readPublicKey() {
        try {
            return Crypt.byteToPublicKey(this.readByteArray(512));
        } catch (CryptException var2) {
            throw new DecoderException("Malformed public key bytes", var2);
        }
    }
 
    public FriendlyByteBuf writePublicKey(PublicKey publicKey) {
        this.writeByteArray(publicKey.getEncoded());
        return this;
    }
 
    public BlockHitResult readBlockHitResult() {
        BlockPos pos = this.readBlockPos();
        Direction face = this.readEnum(Direction.class);
        float clickX = this.readFloat();
        float clickY = this.readFloat();
        float clickZ = this.readFloat();
        boolean inside = this.readBoolean();
        boolean worldBorder = this.readBoolean();
        return new BlockHitResult(
            new Vec3((double)pos.getX() + clickX, (double)pos.getY() + clickY, (double)pos.getZ() + clickZ), face, pos, inside, worldBorder
        );
    }
 
    public void writeBlockHitResult(BlockHitResult blockHit) {
        BlockPos blockPos = blockHit.getBlockPos();
        this.writeBlockPos(blockPos);
        this.writeEnum(blockHit.getDirection());
        Vec3 location = blockHit.getLocation();
        this.writeFloat((float)(location.x - blockPos.getX()));
        this.writeFloat((float)(location.y - blockPos.getY()));
        this.writeFloat((float)(location.z - blockPos.getZ()));
        this.writeBoolean(blockHit.isInside());
        this.writeBoolean(blockHit.isWorldBorderHit());
    }
 
    public BitSet readBitSet() {
        return BitSet.valueOf(this.readLongArray());
    }
 
    public void writeBitSet(BitSet bitSet) {
        this.writeLongArray(bitSet.toLongArray());
    }
 
    public BitSet readFixedBitSet(int size) {
        byte[] bytes = new byte[Mth.positiveCeilDiv(size, 8)];
        this.readBytes(bytes);
        return BitSet.valueOf(bytes);
    }
 
    public void writeFixedBitSet(BitSet bitSet, int size) {
        if (bitSet.length() > size) {
            throw new EncoderException("BitSet is larger than expected size (" + bitSet.length() + ">" + size + ")");
        } else {
            byte[] bytes = bitSet.toByteArray();
            this.writeBytes(Arrays.copyOf(bytes, Mth.positiveCeilDiv(size, 8)));
        }
    }
 
    public static int readContainerId(ByteBuf input) {
        return VarInt.read(input);
    }
 
    public int readContainerId() {
        return readContainerId(this.source);
    }
 
    public static void writeContainerId(ByteBuf output, int id) {
        VarInt.write(output, id);
    }
 
    public void writeContainerId(int id) {
        writeContainerId(this.source, id);
    }
 
    @Override
    public boolean isContiguous() {
        return this.source.isContiguous();
    }
 
    @Override
    public int maxFastWritableBytes() {
        return this.source.maxFastWritableBytes();
    }
 
    @Override
    public int capacity() {
        return this.source.capacity();
    }
 
    public FriendlyByteBuf capacity(int newCapacity) {
        this.source.capacity(newCapacity);
        return this;
    }
 
    @Override
    public int maxCapacity() {
        return this.source.maxCapacity();
    }
 
    @Override
    public ByteBufAllocator alloc() {
        return this.source.alloc();
    }
 
    @Override
    public ByteOrder order() {
        return this.source.order();
    }
 
    @Override
    public ByteBuf order(ByteOrder endianness) {
        return this.source.order(endianness);
    }
 
    @Override
    public ByteBuf unwrap() {
        return this.source;
    }
 
    @Override
    public boolean isDirect() {
        return this.source.isDirect();
    }
 
    @Override
    public boolean isReadOnly() {
        return this.source.isReadOnly();
    }
 
    @Override
    public ByteBuf asReadOnly() {
        return this.source.asReadOnly();
    }
 
    @Override
    public int readerIndex() {
        return this.source.readerIndex();
    }
 
    public FriendlyByteBuf readerIndex(int readerIndex) {
        this.source.readerIndex(readerIndex);
        return this;
    }
 
    @Override
    public int writerIndex() {
        return this.source.writerIndex();
    }
 
    public FriendlyByteBuf writerIndex(int writerIndex) {
        this.source.writerIndex(writerIndex);
        return this;
    }
 
    public FriendlyByteBuf setIndex(int readerIndex, int writerIndex) {
        this.source.setIndex(readerIndex, writerIndex);
        return this;
    }
 
    @Override
    public int readableBytes() {
        return this.source.readableBytes();
    }
 
    @Override
    public int writableBytes() {
        return this.source.writableBytes();
    }
 
    @Override
    public int maxWritableBytes() {
        return this.source.maxWritableBytes();
    }
 
    @Override
    public boolean isReadable() {
        return this.source.isReadable();
    }
 
    @Override
    public boolean isReadable(int size) {
        return this.source.isReadable(size);
    }
 
    @Override
    public boolean isWritable() {
        return this.source.isWritable();
    }
 
    @Override
    public boolean isWritable(int size) {
        return this.source.isWritable(size);
    }
 
    public FriendlyByteBuf clear() {
        this.source.clear();
        return this;
    }
 
    public FriendlyByteBuf markReaderIndex() {
        this.source.markReaderIndex();
        return this;
    }
 
    public FriendlyByteBuf resetReaderIndex() {
        this.source.resetReaderIndex();
        return this;
    }
 
    public FriendlyByteBuf markWriterIndex() {
        this.source.markWriterIndex();
        return this;
    }
 
    public FriendlyByteBuf resetWriterIndex() {
        this.source.resetWriterIndex();
        return this;
    }
 
    public FriendlyByteBuf discardReadBytes() {
        this.source.discardReadBytes();
        return this;
    }
 
    public FriendlyByteBuf discardSomeReadBytes() {
        this.source.discardSomeReadBytes();
        return this;
    }
 
    public FriendlyByteBuf ensureWritable(int minWritableBytes) {
        this.source.ensureWritable(minWritableBytes);
        return this;
    }
 
    @Override
    public int ensureWritable(int minWritableBytes, boolean force) {
        return this.source.ensureWritable(minWritableBytes, force);
    }
 
    @Override
    public boolean getBoolean(int index) {
        return this.source.getBoolean(index);
    }
 
    @Override
    public byte getByte(int index) {
        return this.source.getByte(index);
    }
 
    @Override
    public short getUnsignedByte(int index) {
        return this.source.getUnsignedByte(index);
    }
 
    @Override
    public short getShort(int index) {
        return this.source.getShort(index);
    }
 
    @Override
    public short getShortLE(int index) {
        return this.source.getShortLE(index);
    }
 
    @Override
    public int getUnsignedShort(int index) {
        return this.source.getUnsignedShort(index);
    }
 
    @Override
    public int getUnsignedShortLE(int index) {
        return this.source.getUnsignedShortLE(index);
    }
 
    @Override
    public int getMedium(int index) {
        return this.source.getMedium(index);
    }
 
    @Override
    public int getMediumLE(int index) {
        return this.source.getMediumLE(index);
    }
 
    @Override
    public int getUnsignedMedium(int index) {
        return this.source.getUnsignedMedium(index);
    }
 
    @Override
    public int getUnsignedMediumLE(int index) {
        return this.source.getUnsignedMediumLE(index);
    }
 
    @Override
    public int getInt(int index) {
        return this.source.getInt(index);
    }
 
    @Override
    public int getIntLE(int index) {
        return this.source.getIntLE(index);
    }
 
    @Override
    public long getUnsignedInt(int index) {
        return this.source.getUnsignedInt(index);
    }
 
    @Override
    public long getUnsignedIntLE(int index) {
        return this.source.getUnsignedIntLE(index);
    }
 
    @Override
    public long getLong(int index) {
        return this.source.getLong(index);
    }
 
    @Override
    public long getLongLE(int index) {
        return this.source.getLongLE(index);
    }
 
    @Override
    public char getChar(int index) {
        return this.source.getChar(index);
    }
 
    @Override
    public float getFloat(int index) {
        return this.source.getFloat(index);
    }
 
    @Override
    public double getDouble(int index) {
        return this.source.getDouble(index);
    }
 
    public FriendlyByteBuf getBytes(int index, ByteBuf dst) {
        this.source.getBytes(index, dst);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, ByteBuf dst, int length) {
        this.source.getBytes(index, dst, length);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) {
        this.source.getBytes(index, dst, dstIndex, length);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, byte[] dst) {
        this.source.getBytes(index, dst);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
        this.source.getBytes(index, dst, dstIndex, length);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, ByteBuffer dst) {
        this.source.getBytes(index, dst);
        return this;
    }
 
    public FriendlyByteBuf getBytes(int index, OutputStream out, int length) throws IOException {
        this.source.getBytes(index, out, length);
        return this;
    }
 
    @Override
    public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
        return this.source.getBytes(index, out, length);
    }
 
    @Override
    public int getBytes(int index, FileChannel out, long position, int length) throws IOException {
        return this.source.getBytes(index, out, position, length);
    }
 
    @Override
    public CharSequence getCharSequence(int index, int length, Charset charset) {
        return this.source.getCharSequence(index, length, charset);
    }
 
    public FriendlyByteBuf setBoolean(int index, boolean value) {
        this.source.setBoolean(index, value);
        return this;
    }
 
    public FriendlyByteBuf setByte(int index, int value) {
        this.source.setByte(index, value);
        return this;
    }
 
    public FriendlyByteBuf setShort(int index, int value) {
        this.source.setShort(index, value);
        return this;
    }
 
    public FriendlyByteBuf setShortLE(int index, int value) {
        this.source.setShortLE(index, value);
        return this;
    }
 
    public FriendlyByteBuf setMedium(int index, int value) {
        this.source.setMedium(index, value);
        return this;
    }
 
    public FriendlyByteBuf setMediumLE(int index, int value) {
        this.source.setMediumLE(index, value);
        return this;
    }
 
    public FriendlyByteBuf setInt(int index, int value) {
        this.source.setInt(index, value);
        return this;
    }
 
    public FriendlyByteBuf setIntLE(int index, int value) {
        this.source.setIntLE(index, value);
        return this;
    }
 
    public FriendlyByteBuf setLong(int index, long value) {
        this.source.setLong(index, value);
        return this;
    }
 
    public FriendlyByteBuf setLongLE(int index, long value) {
        this.source.setLongLE(index, value);
        return this;
    }
 
    public FriendlyByteBuf setChar(int index, int value) {
        this.source.setChar(index, value);
        return this;
    }
 
    public FriendlyByteBuf setFloat(int index, float value) {
        this.source.setFloat(index, value);
        return this;
    }
 
    public FriendlyByteBuf setDouble(int index, double value) {
        this.source.setDouble(index, value);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, ByteBuf src) {
        this.source.setBytes(index, src);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, ByteBuf src, int length) {
        this.source.setBytes(index, src, length);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) {
        this.source.setBytes(index, src, srcIndex, length);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, byte[] src) {
        this.source.setBytes(index, src);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, byte[] src, int srcIndex, int length) {
        this.source.setBytes(index, src, srcIndex, length);
        return this;
    }
 
    public FriendlyByteBuf setBytes(int index, ByteBuffer src) {
        this.source.setBytes(index, src);
        return this;
    }
 
    @Override
    public int setBytes(int index, InputStream in, int length) throws IOException {
        return this.source.setBytes(index, in, length);
    }
 
    @Override
    public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
        return this.source.setBytes(index, in, length);
    }
 
    @Override
    public int setBytes(int index, FileChannel in, long position, int length) throws IOException {
        return this.source.setBytes(index, in, position, length);
    }
 
    public FriendlyByteBuf setZero(int index, int length) {
        this.source.setZero(index, length);
        return this;
    }
 
    @Override
    public int setCharSequence(int index, CharSequence sequence, Charset charset) {
        return this.source.setCharSequence(index, sequence, charset);
    }
 
    @Override
    public boolean readBoolean() {
        return this.source.readBoolean();
    }
 
    @Override
    public byte readByte() {
        return this.source.readByte();
    }
 
    @Override
    public short readUnsignedByte() {
        return this.source.readUnsignedByte();
    }
 
    @Override
    public short readShort() {
        return this.source.readShort();
    }
 
    @Override
    public short readShortLE() {
        return this.source.readShortLE();
    }
 
    @Override
    public int readUnsignedShort() {
        return this.source.readUnsignedShort();
    }
 
    @Override
    public int readUnsignedShortLE() {
        return this.source.readUnsignedShortLE();
    }
 
    @Override
    public int readMedium() {
        return this.source.readMedium();
    }
 
    @Override
    public int readMediumLE() {
        return this.source.readMediumLE();
    }
 
    @Override
    public int readUnsignedMedium() {
        return this.source.readUnsignedMedium();
    }
 
    @Override
    public int readUnsignedMediumLE() {
        return this.source.readUnsignedMediumLE();
    }
 
    @Override
    public int readInt() {
        return this.source.readInt();
    }
 
    @Override
    public int readIntLE() {
        return this.source.readIntLE();
    }
 
    @Override
    public long readUnsignedInt() {
        return this.source.readUnsignedInt();
    }
 
    @Override
    public long readUnsignedIntLE() {
        return this.source.readUnsignedIntLE();
    }
 
    @Override
    public long readLong() {
        return this.source.readLong();
    }
 
    @Override
    public long readLongLE() {
        return this.source.readLongLE();
    }
 
    @Override
    public char readChar() {
        return this.source.readChar();
    }
 
    @Override
    public float readFloat() {
        return this.source.readFloat();
    }
 
    @Override
    public double readDouble() {
        return this.source.readDouble();
    }
 
    @Override
    public ByteBuf readBytes(int length) {
        return this.source.readBytes(length);
    }
 
    @Override
    public ByteBuf readSlice(int length) {
        return this.source.readSlice(length);
    }
 
    @Override
    public ByteBuf readRetainedSlice(int length) {
        return this.source.readRetainedSlice(length);
    }
 
    public FriendlyByteBuf readBytes(ByteBuf dst) {
        this.source.readBytes(dst);
        return this;
    }
 
    public FriendlyByteBuf readBytes(ByteBuf dst, int length) {
        this.source.readBytes(dst, length);
        return this;
    }
 
    public FriendlyByteBuf readBytes(ByteBuf dst, int dstIndex, int length) {
        this.source.readBytes(dst, dstIndex, length);
        return this;
    }
 
    public FriendlyByteBuf readBytes(byte[] dst) {
        this.source.readBytes(dst);
        return this;
    }
 
    public FriendlyByteBuf readBytes(byte[] dst, int dstIndex, int length) {
        this.source.readBytes(dst, dstIndex, length);
        return this;
    }
 
    public FriendlyByteBuf readBytes(ByteBuffer dst) {
        this.source.readBytes(dst);
        return this;
    }
 
    public FriendlyByteBuf readBytes(OutputStream out, int length) throws IOException {
        this.source.readBytes(out, length);
        return this;
    }
 
    @Override
    public int readBytes(GatheringByteChannel out, int length) throws IOException {
        return this.source.readBytes(out, length);
    }
 
    @Override
    public CharSequence readCharSequence(int length, Charset charset) {
        return this.source.readCharSequence(length, charset);
    }
 
    @Override
    public String readString(int length, Charset charset) {
        return this.source.readString(length, charset);
    }
 
    @Override
    public int readBytes(FileChannel out, long position, int length) throws IOException {
        return this.source.readBytes(out, position, length);
    }
 
    public FriendlyByteBuf skipBytes(int length) {
        this.source.skipBytes(length);
        return this;
    }
 
    public FriendlyByteBuf writeBoolean(boolean value) {
        this.source.writeBoolean(value);
        return this;
    }
 
    public FriendlyByteBuf writeByte(int value) {
        this.source.writeByte(value);
        return this;
    }
 
    public FriendlyByteBuf writeShort(int value) {
        this.source.writeShort(value);
        return this;
    }
 
    public FriendlyByteBuf writeShortLE(int value) {
        this.source.writeShortLE(value);
        return this;
    }
 
    public FriendlyByteBuf writeMedium(int value) {
        this.source.writeMedium(value);
        return this;
    }
 
    public FriendlyByteBuf writeMediumLE(int value) {
        this.source.writeMediumLE(value);
        return this;
    }
 
    public FriendlyByteBuf writeInt(int value) {
        this.source.writeInt(value);
        return this;
    }
 
    public FriendlyByteBuf writeIntLE(int value) {
        this.source.writeIntLE(value);
        return this;
    }
 
    public FriendlyByteBuf writeLong(long value) {
        this.source.writeLong(value);
        return this;
    }
 
    public FriendlyByteBuf writeLongLE(long value) {
        this.source.writeLongLE(value);
        return this;
    }
 
    public FriendlyByteBuf writeChar(int value) {
        this.source.writeChar(value);
        return this;
    }
 
    public FriendlyByteBuf writeFloat(float value) {
        this.source.writeFloat(value);
        return this;
    }
 
    public FriendlyByteBuf writeDouble(double value) {
        this.source.writeDouble(value);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(ByteBuf src) {
        this.source.writeBytes(src);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(ByteBuf src, int length) {
        this.source.writeBytes(src, length);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(ByteBuf src, int srcIndex, int length) {
        this.source.writeBytes(src, srcIndex, length);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(byte[] src) {
        this.source.writeBytes(src);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(byte[] src, int srcIndex, int length) {
        this.source.writeBytes(src, srcIndex, length);
        return this;
    }
 
    public FriendlyByteBuf writeBytes(ByteBuffer src) {
        this.source.writeBytes(src);
        return this;
    }
 
    @Override
    public int writeBytes(InputStream in, int length) throws IOException {
        return this.source.writeBytes(in, length);
    }
 
    @Override
    public int writeBytes(ScatteringByteChannel in, int length) throws IOException {
        return this.source.writeBytes(in, length);
    }
 
    @Override
    public int writeBytes(FileChannel in, long position, int length) throws IOException {
        return this.source.writeBytes(in, position, length);
    }
 
    public FriendlyByteBuf writeZero(int length) {
        this.source.writeZero(length);
        return this;
    }
 
    @Override
    public int writeCharSequence(CharSequence sequence, Charset charset) {
        return this.source.writeCharSequence(sequence, charset);
    }
 
    @Override
    public int indexOf(int fromIndex, int toIndex, byte value) {
        return this.source.indexOf(fromIndex, toIndex, value);
    }
 
    @Override
    public int bytesBefore(byte value) {
        return this.source.bytesBefore(value);
    }
 
    @Override
    public int bytesBefore(int length, byte value) {
        return this.source.bytesBefore(length, value);
    }
 
    @Override
    public int bytesBefore(int index, int length, byte value) {
        return this.source.bytesBefore(index, length, value);
    }
 
    @Override
    public int forEachByte(ByteProcessor processor) {
        return this.source.forEachByte(processor);
    }
 
    @Override
    public int forEachByte(int index, int length, ByteProcessor processor) {
        return this.source.forEachByte(index, length, processor);
    }
 
    @Override
    public int forEachByteDesc(ByteProcessor processor) {
        return this.source.forEachByteDesc(processor);
    }
 
    @Override
    public int forEachByteDesc(int index, int length, ByteProcessor processor) {
        return this.source.forEachByteDesc(index, length, processor);
    }
 
    @Override
    public ByteBuf copy() {
        return this.source.copy();
    }
 
    @Override
    public ByteBuf copy(int index, int length) {
        return this.source.copy(index, length);
    }
 
    @Override
    public ByteBuf slice() {
        return this.source.slice();
    }
 
    @Override
    public ByteBuf retainedSlice() {
        return this.source.retainedSlice();
    }
 
    @Override
    public ByteBuf slice(int index, int length) {
        return this.source.slice(index, length);
    }
 
    @Override
    public ByteBuf retainedSlice(int index, int length) {
        return this.source.retainedSlice(index, length);
    }
 
    @Override
    public ByteBuf duplicate() {
        return this.source.duplicate();
    }
 
    @Override
    public ByteBuf retainedDuplicate() {
        return this.source.retainedDuplicate();
    }
 
    @Override
    public int nioBufferCount() {
        return this.source.nioBufferCount();
    }
 
    @Override
    public ByteBuffer nioBuffer() {
        return this.source.nioBuffer();
    }
 
    @Override
    public ByteBuffer nioBuffer(int index, int length) {
        return this.source.nioBuffer(index, length);
    }
 
    @Override
    public ByteBuffer internalNioBuffer(int index, int length) {
        return this.source.internalNioBuffer(index, length);
    }
 
    @Override
    public ByteBuffer[] nioBuffers() {
        return this.source.nioBuffers();
    }
 
    @Override
    public ByteBuffer[] nioBuffers(int index, int length) {
        return this.source.nioBuffers(index, length);
    }
 
    @Override
    public boolean hasArray() {
        return this.source.hasArray();
    }
 
    @Override
    public byte[] array() {
        return this.source.array();
    }
 
    @Override
    public int arrayOffset() {
        return this.source.arrayOffset();
    }
 
    @Override
    public boolean hasMemoryAddress() {
        return this.source.hasMemoryAddress();
    }
 
    @Override
    public long memoryAddress() {
        return this.source.memoryAddress();
    }
 
    @Override
    public String toString(Charset charset) {
        return this.source.toString(charset);
    }
 
    @Override
    public String toString(int index, int length, Charset charset) {
        return this.source.toString(index, length, charset);
    }
 
    @Override
    public int hashCode() {
        return this.source.hashCode();
    }
 
    @Override
    public boolean equals(Object obj) {
        return this.source.equals(obj);
    }
 
    @Override
    public int compareTo(ByteBuf buffer) {
        return this.source.compareTo(buffer);
    }
 
    @Override
    public String toString() {
        return this.source.toString();
    }
 
    public FriendlyByteBuf retain(int increment) {
        this.source.retain(increment);
        return this;
    }
 
    public FriendlyByteBuf retain() {
        this.source.retain();
        return this;
    }
 
    public FriendlyByteBuf touch() {
        this.source.touch();
        return this;
    }
 
    public FriendlyByteBuf touch(Object hint) {
        this.source.touch(hint);
        return this;
    }
 
    @Override
    public int refCnt() {
        return this.source.refCnt();
    }
 
    @Override
    public boolean release() {
        return this.source.release();
    }
 
    @Override
    public boolean release(int decrement) {
        return this.source.release(decrement);
    }
}

引用的其他类

  • OptionInstance

    • 引用位置: 参数/返回值
  • BlockPos

    • 引用位置: 参数/方法调用/返回值
    • 关联成员: BlockPos.of()
  • GlobalPos

    • 引用位置: 参数/方法调用/返回值
    • 关联成员: GlobalPos.of()
  • Registry

    • 引用位置: 参数/返回值
  • CompoundTag

    • 引用位置: 返回值
  • NbtAccounter

    • 引用位置: 参数/方法调用
    • 关联成员: NbtAccounter.defaultQuota(), NbtAccounter.unlimitedHeap()
  • NbtIo

    • 引用位置: 方法调用
    • 关联成员: NbtIo.readAnyTag(), NbtIo.writeAnyTag()
  • Tag

    • 引用位置: 参数/返回值
  • Utf8String

    • 引用位置: 方法调用
    • 关联成员: Utf8String.read(), Utf8String.write()
  • VarInt

    • 引用位置: 方法调用
    • 关联成员: VarInt.read(), VarInt.write()
  • VarLong

    • 引用位置: 方法调用
    • 关联成员: VarLong.read(), VarLong.write()
  • StreamDecoder

    • 引用位置: 参数
  • StreamEncoder

    • 引用位置: 参数
  • Identifier

    • 引用位置: 参数/方法调用/返回值
    • 关联成员: Identifier.parse()
  • ResourceKey

    • 引用位置: 参数/方法调用/返回值
    • 关联成员: ResourceKey.create(), ResourceKey.createRegistryKey()
  • Crypt

    • 引用位置: 方法调用
    • 关联成员: Crypt.byteToPublicKey()
  • LenientJsonParser

    • 引用位置: 方法调用
    • 关联成员: LenientJsonParser.parse()
  • Mth

    • 引用位置: 方法调用
    • 关联成员: Mth.positiveCeilDiv()
  • ChunkPos

    • 引用位置: 参数/方法调用/返回值
    • 关联成员: ChunkPos.unpack()
  • BlockHitResult

    • 引用位置: 参数/构造调用/返回值
    • 关联成员: BlockHitResult()
  • Vec3

    • 引用位置: 构造调用
    • 关联成员: Vec3()