Class ValueTransformer<T1,T2>
java.lang.Object
com.viaversion.viaversion.api.protocol.remapper.ValueTransformer<T1,T2>
- All Implemented Interfaces:
ValueWriter<T1>
-
Constructor Summary
ModifierConstructorDescriptionprotected
ValueTransformer
(@Nullable Type<T1> inputType, Type<T2> outputType) protected
ValueTransformer
(Type<T2> outputType) -
Method Summary
Modifier and TypeMethodDescriptionabstract T2
transform
(PacketWrapper wrapper, T1 inputValue) Transform a value from one type to anothervoid
write
(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:ValueWriter
Write a value to a packet- Specified by:
write
in interfaceValueWriter<T1>
- Parameters:
writer
- The packet wrapper to write toinputValue
- The value to write- Throws:
InformativeException
-
getInputType
-
getOutputType
-