Class Type<T>
java.lang.Object
com.viaversion.viaversion.api.type.Type<T>
- Type Parameters:
T
- read/written type
- All Implemented Interfaces:
ByteBufReader<T>
,ByteBufWriter<T>
- Direct Known Subclasses:
ArrayType
,BitSetType
,BlockChangeRecordType
,BlockEntityType1_18
,BlockEntityType1_20_2
,BlockPositionType1_14
,BlockPositionType1_8
,BooleanType
,BulkChunkType1_8
,ByteArrayType
,ByteType
,ChunkPositionType
,ChunkSectionType1_13
,ChunkSectionType1_16
,ChunkSectionType1_18
,ChunkSectionType1_8
,ChunkSectionType1_9
,ChunkType1_13
,ChunkType1_14
,ChunkType1_15
,ChunkType1_16
,ChunkType1_16_2
,ChunkType1_17
,ChunkType1_18
,ChunkType1_20_2
,ChunkType1_8
,ChunkType1_9_1
,ChunkType1_9_3
,ComponentType
,CompoundTagType
,DoubleType
,DynamicType
,EmptyType
,EntityDataListTypeTemplate
,EntityDataTypeTemplate
,EulerAngleType
,Filterable.FilterableType
,FixedByteArrayType
,FloatType
,GameProfileType
,GlobalBlockPositionType
,HolderSetType
,HolderType
,IntArrayType
,IntType
,ItemCostType1_20_5
,ItemShortArrayType1_13
,ItemShortArrayType1_13_2
,ItemShortArrayType1_8
,ItemType1_13
,ItemType1_13_2
,ItemType1_20_2
,ItemType1_20_5
,ItemType1_8
,LongArrayType
,LongType
,NamedCompoundTagType
,OptionalType
,OptionalVarIntType
,PaletteType1_18
,PlayerMessageSignatureType
,ProfileKeyType
,QuaternionType
,RegistryEntryType
,RemainingBytesType
,ShortByteArrayType
,ShortType
,StringType
,StructuredDataType
,TagType
,UnsignedByteType
,UnsignedShortType
,UUIDType
,VarIntArrayType
,VarIntType
,VarLongBlockChangeRecordType
,VarLongType
,Vector3fType
,VectorType
,VillagerDataType
Type for buffer reading and writing.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the base class, useful when the output class is insufficient for type comparison.Returns the output class type.Returns the type name.static <X,
Y> Either<X, Y> readEither
(io.netty.buffer.ByteBuf buf, Type<X> leftType, Type<Y> rightType) toString()
static <X,
Y> void writeEither
(io.netty.buffer.ByteBuf buf, Either<X, Y> value, Type<X> leftType, Type<Y> rightType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.viaversion.viaversion.api.type.ByteBufReader
read
Methods inherited from interface com.viaversion.viaversion.api.type.ByteBufWriter
write
-
Constructor Details
-
Type
-
Type
-
-
Method Details
-
getOutputClass
Returns the output class type.- Returns:
- output class type
-
getTypeName
Returns the type name.- Returns:
- type name
-
getBaseClass
Returns the base class, useful when the output class is insufficient for type comparison. One such case are types with {List
} as their output type.- Returns:
- base class
-
toString
-
readEither
-
writeEither
-