Package codechicken.lib.data
Class MCDataByteBuf
java.lang.Object
codechicken.lib.data.MCDataByteBuf
- All Implemented Interfaces:
MCDataInput,MCDataOutput
- Direct Known Subclasses:
PacketCustom
@Deprecated(forRemoval=true)
public class MCDataByteBuf
extends Object
implements MCDataInput, MCDataOutput
Deprecated, for removal: This API element is subject to removal in a future version.
An
MCDataInput and MCDataOutput implementation,
delegating to the provided ByteBuf.
Created by covers1624 on 4/16/20.
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.lib.data.MCDataInput
MCDataInput.InputStreamWrapperNested classes/interfaces inherited from interface codechicken.lib.data.MCDataOutput
MCDataOutput.OutputStreamWrapper -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.netty.buffer.ByteBufDeprecated, for removal: This API element is subject to removal in a future version.protected final @Nullable net.minecraft.core.RegistryAccessDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.MCDataByteBuf(io.netty.buffer.ByteBuf buf) Deprecated, for removal: This API element is subject to removal in a future version.MCDataByteBuf(io.netty.buffer.ByteBuf buf, @Nullable net.minecraft.core.RegistryAccess registryAccess) Deprecated, for removal: This API element is subject to removal in a future version.MCDataByteBuf(@Nullable net.minecraft.core.RegistryAccess registryAccess) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic MCDataByteBuffromTag(net.minecraft.nbt.Tag tag, net.minecraft.core.RegistryAccess registries) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Reads a boolean from the stream.bytereadByte()Deprecated, for removal: This API element is subject to removal in a future version.Reads a byte from the stream.charreadChar()Deprecated, for removal: This API element is subject to removal in a future version.Reads a char from the stream.doubleDeprecated, for removal: This API element is subject to removal in a future version.Reads a double from the stream.floatDeprecated, for removal: This API element is subject to removal in a future version.Reads a float from the stream.static MCDataByteBufreadFromNBT(net.minecraft.nbt.CompoundTag tag, String key, net.minecraft.core.RegistryAccess registries) Deprecated, for removal: This API element is subject to removal in a future version.intreadInt()Deprecated, for removal: This API element is subject to removal in a future version.Reads an int from the stream.longreadLong()Deprecated, for removal: This API element is subject to removal in a future version.Reads a long from the stream.shortDeprecated, for removal: This API element is subject to removal in a future version.Reads a Short from the stream.shortDeprecated, for removal: This API element is subject to removal in a future version.Reads an Unsigned byte from the stream.intDeprecated, for removal: This API element is subject to removal in a future version.Reads an Unsigned short from the stream.<T> TreadWithCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.FriendlyByteBuf, T> codec) Deprecated, for removal: This API element is subject to removal in a future version.<T> TreadWithRegistryCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.RegistryFriendlyByteBuf, T> codec) Deprecated, for removal: This API element is subject to removal in a future version.net.minecraft.network.FriendlyByteBufDeprecated, for removal: This API element is subject to removal in a future version.Gets the underlying buffer as aFriendlyByteBuf.net.minecraft.network.RegistryFriendlyByteBufDeprecated, for removal: This API element is subject to removal in a future version.net.minecraft.nbt.TagtoTag()Deprecated, for removal: This API element is subject to removal in a future version.writeBoolean(boolean b) Deprecated, for removal: This API element is subject to removal in a future version.Writes a boolean to the stream.writeByte(int b) Deprecated, for removal: This API element is subject to removal in a future version.Writes a byte to the stream.writeChar(int c) Deprecated, for removal: This API element is subject to removal in a future version.Writes a char to the stream.writeDouble(double d) Deprecated, for removal: This API element is subject to removal in a future version.Writes a double to the stream.writeFloat(float f) Deprecated, for removal: This API element is subject to removal in a future version.Writes a float to the stream.writeInt(int i) Deprecated, for removal: This API element is subject to removal in a future version.Writes a int to the stream.writeLong(long l) Deprecated, for removal: This API element is subject to removal in a future version.Writes a long to the stream.writeShort(int s) Deprecated, for removal: This API element is subject to removal in a future version.Writes a short to the stream.net.minecraft.nbt.CompoundTagwriteToNBT(net.minecraft.nbt.CompoundTag tag, String key) Deprecated, for removal: This API element is subject to removal in a future version.<T> MCDataOutputwriteWithCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.FriendlyByteBuf, T> codec, T thing) Deprecated, for removal: This API element is subject to removal in a future version.<T> MCDataOutputwriteWithRegistryCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.RegistryFriendlyByteBuf, T> codec, T thing) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codechicken.lib.data.MCDataInput
readBooleans, readByteBuf, readByteBuffer, readBytes, readCharBuffer, readChars, readCompoundNBT, readCuboid, readDirection, readDoubleBuffer, readDoubles, readEnum, readFloatBuffer, readFloats, readFluidStack, readIntBuffer, readInts, readItemStack, readLongBuffer, readLongs, readNullableCompoundNBT, readPos, readRegistryId, readRegistryIdDirect, readResourceLocation, readShortBuffer, readShorts, readSignedVarInt, readSignedVarInts, readSignedVarLong, readSignedVarLongs, readString, readTextComponent, readUUID, readVarInt, readVarInts, readVarLong, readVarLongs, readVec3d, readVec3f, readVec3i, readVector, toDataInput, toInputStreamMethods inherited from interface codechicken.lib.data.MCDataOutput
append, append, toDataOutput, toOutputStream, writeBooleans, writeBooleans, writeByteBuf, writeByteBuffer, writeBytes, writeBytes, writeCharBuffer, writeChars, writeChars, writeCompoundNBT, writeCuboid, writeDirection, writeDoubleBuffer, writeDoubles, writeDoubles, writeEnum, writeFloatBuffer, writeFloats, writeFloats, writeFluidStack, writeIntBuffer, writeInts, writeInts, writeItemStack, writeLongBuffer, writeLongs, writeLongs, writeNullableCompoundNBT, writePos, writeRegistryId, writeRegistryId, writeRegistryIdDirect, writeRegistryIdDirect, writeResourceLocation, writeShortBuffer, writeShorts, writeShorts, writeSignedVarInt, writeSignedVarInts, writeSignedVarInts, writeSignedVarLong, writeSignedVarLongs, writeSignedVarLongs, writeString, writeString, writeTextComponent, writeUUID, writeVarInt, writeVarInts, writeVarInts, writeVarLong, writeVarLongs, writeVarLongs, writeVec3d, writeVec3f, writeVec3i, writeVector
-
Field Details
-
buf
protected final io.netty.buffer.ByteBuf bufDeprecated, for removal: This API element is subject to removal in a future version. -
registryAccess
@Nullable protected final @Nullable net.minecraft.core.RegistryAccess registryAccessDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
MCDataByteBuf
public MCDataByteBuf()Deprecated, for removal: This API element is subject to removal in a future version. -
MCDataByteBuf
public MCDataByteBuf(@Nullable @Nullable net.minecraft.core.RegistryAccess registryAccess) Deprecated, for removal: This API element is subject to removal in a future version. -
MCDataByteBuf
public MCDataByteBuf(io.netty.buffer.ByteBuf buf) Deprecated, for removal: This API element is subject to removal in a future version. -
MCDataByteBuf
public MCDataByteBuf(io.netty.buffer.ByteBuf buf, @Nullable @Nullable net.minecraft.core.RegistryAccess registryAccess) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
toFriendlyByteBuf
public net.minecraft.network.FriendlyByteBuf toFriendlyByteBuf()Deprecated, for removal: This API element is subject to removal in a future version.Gets the underlying buffer as aFriendlyByteBuf.- Returns:
- The
FriendlyByteBuf.
-
toRegistryFriendlyByteBuf
public net.minecraft.network.RegistryFriendlyByteBuf toRegistryFriendlyByteBuf()Deprecated, for removal: This API element is subject to removal in a future version. -
toTag
public net.minecraft.nbt.Tag toTag()Deprecated, for removal: This API element is subject to removal in a future version. -
fromTag
public static MCDataByteBuf fromTag(net.minecraft.nbt.Tag tag, net.minecraft.core.RegistryAccess registries) Deprecated, for removal: This API element is subject to removal in a future version. -
writeToNBT
Deprecated, for removal: This API element is subject to removal in a future version. -
readFromNBT
public static MCDataByteBuf readFromNBT(net.minecraft.nbt.CompoundTag tag, String key, net.minecraft.core.RegistryAccess registries) Deprecated, for removal: This API element is subject to removal in a future version. -
writeWithCodec
public <T> MCDataOutput writeWithCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.FriendlyByteBuf, T> codec, T thing) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeWithCodecin interfaceMCDataOutput
-
writeWithRegistryCodec
public <T> MCDataOutput writeWithRegistryCodec(net.minecraft.network.codec.StreamEncoder<? super net.minecraft.network.RegistryFriendlyByteBuf, T> codec, T thing) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
writeWithRegistryCodecin interfaceMCDataOutput
-
readWithCodec
public <T> T readWithCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.FriendlyByteBuf, T> codec) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readWithCodecin interfaceMCDataInput
-
readWithRegistryCodec
public <T> T readWithRegistryCodec(net.minecraft.network.codec.StreamDecoder<? super net.minecraft.network.RegistryFriendlyByteBuf, T> codec) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
readWithRegistryCodecin interfaceMCDataInput
-
readByte
public byte readByte()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a byte from the stream.- Specified by:
readBytein interfaceMCDataInput- Returns:
- The byte.
-
readUByte
public short readUByte()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads an Unsigned byte from the stream.- Specified by:
readUBytein interfaceMCDataInput- Returns:
- The Unsigned byte.
-
readChar
public char readChar()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a char from the stream.- Specified by:
readCharin interfaceMCDataInput- Returns:
- The char.
-
readShort
public short readShort()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a Short from the stream.- Specified by:
readShortin interfaceMCDataInput- Returns:
- The short.
-
readUShort
public int readUShort()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads an Unsigned short from the stream.- Specified by:
readUShortin interfaceMCDataInput- Returns:
- The Unsigned short.
-
readInt
public int readInt()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads an int from the stream.- Specified by:
readIntin interfaceMCDataInput- Returns:
- The int.
-
readLong
public long readLong()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a long from the stream.- Specified by:
readLongin interfaceMCDataInput- Returns:
- The long.
-
readFloat
public float readFloat()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a float from the stream.- Specified by:
readFloatin interfaceMCDataInput- Returns:
- The float.
-
readDouble
public double readDouble()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a double from the stream.- Specified by:
readDoublein interfaceMCDataInput- Returns:
- The double.
-
readBoolean
public boolean readBoolean()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataInputReads a boolean from the stream.- Specified by:
readBooleanin interfaceMCDataInput- Returns:
- The boolean.
-
writeByte
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a byte to the stream.- Specified by:
writeBytein interfaceMCDataOutput- Parameters:
b- The byte.- Returns:
- The same stream.
-
writeChar
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a char to the stream.- Specified by:
writeCharin interfaceMCDataOutput- Parameters:
c- The char.- Returns:
- The same stream.
-
writeShort
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a short to the stream.- Specified by:
writeShortin interfaceMCDataOutput- Parameters:
s- The short.- Returns:
- The same stream.
-
writeInt
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a int to the stream.- Specified by:
writeIntin interfaceMCDataOutput- Parameters:
i- The int.- Returns:
- The same stream.
-
writeLong
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a long to the stream.- Specified by:
writeLongin interfaceMCDataOutput- Parameters:
l- The long.- Returns:
- The same stream.
-
writeFloat
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a float to the stream.- Specified by:
writeFloatin interfaceMCDataOutput- Parameters:
f- The float.- Returns:
- The same stream.
-
writeDouble
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a double to the stream.- Specified by:
writeDoublein interfaceMCDataOutput- Parameters:
d- The double.- Returns:
- The same stream.
-
writeBoolean
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MCDataOutputWrites a boolean to the stream.- Specified by:
writeBooleanin interfaceMCDataOutput- Parameters:
b- The boolean.- Returns:
- The same stream.
-