Class ValueTransformer<T1,T2>
java.lang.Object
com.viaversion.viaversion.api.protocol.remapper.ValueTransformer<T1,T2>
- All Implemented Interfaces:
ValueWriter<T1>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedValueTransformer(@Nullable Type<T1> inputType, Type<T2> outputType) protectedValueTransformer(Type<T2> outputType) -
Method Summary
Modifier and TypeMethodDescriptionabstract T2transform(PacketWrapper wrapper, T1 inputValue) Transform a value from one type to anothervoidwrite(PacketWrapper writer, T1 inputValue) Write a value to a packet
-
Constructor Details
-
ValueTransformer
-
ValueTransformer
-
-
Method Details
-
transform
Transform a value from one type to another- Parameters:
wrapper- The current packetinputValue- The input value- Returns:
- The value to write to the wrapper
- Throws:
InformativeException
-
write
Description copied from interface:ValueWriterWrite a value to a packet- Specified by:
writein interfaceValueWriter<T1>- Parameters:
writer- The packet wrapper to write toinputValue- The value to write- Throws:
InformativeException
-
getInputType
-
getOutputType
-