Package com.mojang.serialization
Interface Decoder.Terminal<A>
- Type Parameters:
A
- the type of object to decode
public static interface Decoder.Terminal<A>
Can decode an object from a serialized form, but does not return any remaining serialized data.
-
Method Summary
Modifier and TypeMethodDescription<T> DataResult<A>
decode
(DynamicOps<T> ops, T input) Decodes an object from a serialized form, but does not return any remaining serialized data.decoder()
Returns a new decoder with the logic of this object, discarding any remaining serialized data.
-
Method Details
-
decode
Decodes an object from a serialized form, but does not return any remaining serialized data.- Type Parameters:
T
- the type of the serialized form- Parameters:
ops
- aDynamicOps
for the serialized forminput
- the serialized form to decode- Returns:
- a
DataResult
containing the decoded object, or an error if the object could not be decoded
-
decoder
Returns a new decoder with the logic of this object, discarding any remaining serialized data.- Returns:
- a new decoder with the logic of this object, discarding any remaining serialized data
-