Interface MCDataInput

All Known Implementing Classes:
MCDataByteBuf, MCDataInputStream, PacketCustom

@Deprecated(forRemoval=true) public interface MCDataInput
Deprecated, for removal: This API element is subject to removal in a future version.
Provides the ability to read various datas from some sort of data stream. See MCDataInputStream to wrap an InputStream to this. See MCByteStream to wrap an ByteBuf to this.

Created by covers1624 on 4/15/20.

  • Method Details

    • readByte

      byte readByte()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a byte from the stream.
      Returns:
      The byte.
    • readUByte

      short readUByte()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an Unsigned byte from the stream.
      Returns:
      The Unsigned byte.
    • readChar

      char readChar()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a char from the stream.
      Returns:
      The char.
    • readShort

      short readShort()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Short from the stream.
      Returns:
      The short.
    • readUShort

      int readUShort()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an Unsigned short from the stream.
      Returns:
      The Unsigned short.
    • readInt

      int readInt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an int from the stream.
      Returns:
      The int.
    • readLong

      long readLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a long from the stream.
      Returns:
      The long.
    • readFloat

      float readFloat()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a float from the stream.
      Returns:
      The float.
    • readDouble

      double readDouble()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a double from the stream.
      Returns:
      The double.
    • readBoolean

      boolean readBoolean()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a boolean from the stream.
      Returns:
      The boolean.
    • readBytes

      default byte[] readBytes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The bytes.
    • readChars

      default char[] readChars()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The chars.
    • readShorts

      default short[] readShorts()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The shorts.
    • readInts

      default int[] readInts()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The ints.
    • readLongs

      default long[] readLongs()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The longs.
    • readFloats

      default float[] readFloats()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The floats.
    • readDoubles

      default double[] readDoubles()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The doubles.
    • readBooleans

      default boolean[] readBooleans()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The booleans.
    • readVarInt

      default int readVarInt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Variable length int from the stream.
      Returns:
      The int.
    • readVarLong

      default long readVarLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Variable length long from the stream.
      Returns:
      The long.
    • readSignedVarInt

      default int readSignedVarInt()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Variable length signed int.
      Returns:
      The int.
      See Also:
    • readSignedVarLong

      default long readSignedVarLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Variable length signed long.
      Returns:
      The long.
      See Also:
    • readVarInts

      default int[] readVarInts()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Variable length ints from the stream.
      Returns:
      The ints.
    • readVarLongs

      default long[] readVarLongs()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Variable length longs from the stream.
      Returns:
      The longs.
    • readSignedVarInts

      default int[] readSignedVarInts()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Variable length Signed ints from the stream.
      Returns:
      The ints.
    • readSignedVarLongs

      default long[] readSignedVarLongs()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Variable length Signed longs from the stream.
      Returns:
      The longs.
    • readString

      default String readString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a UTF-8 encoded String from the stream.
      Returns:
      The String.
    • readUUID

      default UUID readUUID()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a UUID from the stream.
      Returns:
      The UUID.
    • readEnum

      default <T extends Enum<T>> T readEnum(Class<T> clazz)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an Enum value from the stream.
      Parameters:
      clazz - The Class of the enum.
      Returns:
      The Enum value.
    • readByteBuffer

      default ByteBuffer readByteBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The bytes.
    • readCharBuffer

      default CharBuffer readCharBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The chars.
    • readShortBuffer

      default ShortBuffer readShortBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The shorts.
    • readIntBuffer

      default IntBuffer readIntBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The ints.
    • readLongBuffer

      default LongBuffer readLongBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The longs.
    • readFloatBuffer

      default FloatBuffer readFloatBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The floats.
    • readDoubleBuffer

      default DoubleBuffer readDoubleBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The doubles.
    • readVector

      default Vector3 readVector()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Vector3 from the stream.
      Returns:
      The Vector3.
    • readCuboid

      default Cuboid6 readCuboid()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Cuboid6 from the stream.
      Returns:
      The Cuboid6.
    • readResourceLocation

      default net.minecraft.resources.Identifier readResourceLocation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Identifier from the stream.
      Returns:
      The Identifier.
    • readDirection

      default net.minecraft.core.Direction readDirection()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Direction from the stream.
      Returns:
      The Direction.
    • readPos

      default net.minecraft.core.BlockPos readPos()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a BlockPos from the stream.
      Returns:
      The BlockPos.
    • readVec3i

      default net.minecraft.core.Vec3i readVec3i()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Vec3i from the stream.
      Returns:
      The Vec3i.
    • readVec3d

      default net.minecraft.world.phys.Vec3 readVec3d()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Vec3 from the stream.
      Returns:
      The Vec3.
    • readVec3f

      default org.joml.Vector3f readVec3f()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a Vector3f from the stream.
      Returns:
      The Vector3f.
    • readCompoundNBT

      default net.minecraft.nbt.CompoundTag readCompoundNBT()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a CompoundTag from the stream.
      Returns:
      The CompoundTag.
    • readNullableCompoundNBT

      @Nullable default @Nullable net.minecraft.nbt.CompoundTag readNullableCompoundNBT()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a CompoundTag from the stream.
      Returns:
      The CompoundTag or null.
    • readItemStack

      default net.minecraft.world.item.ItemStack readItemStack()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an ItemStack from the stream. It should also be noted that this implementation reads the ItemStack.getCount() as a varInt opposed to a byte, as that is favourable in some cases.
      Returns:
      The ItemStack.
    • readFluidStack

      default net.neoforged.neoforge.fluids.FluidStack readFluidStack()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a FluidStack from the stream.
      Returns:
      The FluidStack.
    • readTextComponent

      default net.minecraft.network.chat.Component readTextComponent()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an Component from the stream.
      Returns:
      The Component.
    • readRegistryIdDirect

      default <T> T readRegistryIdDirect(net.minecraft.core.Registry<T> registry)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a registry object from the stream.
      Parameters:
      registry - The Registry to load the entry from.
      Returns:
      The registry object..
      See Also:
    • readRegistryId

      default <T> T readRegistryId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads a registry object from the stream.
      Returns:
      The registry object.
      See Also:
    • readWithCodec

      default <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.
    • readWithRegistryCodec

      default <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.
    • readByteBuf

      default io.netty.buffer.ByteBuf readByteBuf()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The bytes.
    • toDataInput

      default DataInput toDataInput()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wraps this stream into a DataInput stream. any data read from the returned DataInput is read from this stream.
      Returns:
      The DataInput.
    • toInputStream

      default InputStream toInputStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wraps this stream into an InputStream. any data read from the returned InputStream is read from this stream.
      Returns:
      The InputStream.